function deleteRecords($rptopIDArray = "") { $rptop = new RPTOP(); $rows = 0; foreach ($rptopIDArray as $key => $value) { if ($rptop->deleteRecord($value)) { $rows++; } } return $rows; }