function deleteRecords($districtIDArray = "") { $district = new District(); $rows = 0; foreach ($districtIDArray as $key => $value) { if ($district->deleteRecord($value)) { $rows++; } } return $rows; }