function removeRecords($plantsTreesIDArray = "") { $plantsTrees = new PlantsTrees(); $rows = 0; foreach ($plantsTreesIDArray as $key => $value) { if ($plantsTrees->removeRecord($value)) { $rows++; } } return $rows; }