function remove_unwanted($row, $remove) { $this->to_remove = $remove; if (in_array($remove, $row->Cells)) { $width = $remove->width; $divider = $remove->row_divider; $index = array_search($remove, $row->Cells); $spacers = WPDD_Utils::create_cells($width, $divider); array_splice($row->Cells, $index, 1, $spacers); } return $row; }