I'm not sure how to process the following:
Here is my post array:
client[] 15
client[] 16
team[] 1,8
team[] 3,4,2
staff[] 5
staff[] 6
For the client and staff arrays, I use implode like:
function _implode($array) {
$result = array();
foreach ($array as $row) {
if ($row != '') {
array_push($result, $row);
}
}
return implode(",", $result);
}
$clients = _implode($_POST['client']);
$staff= _implode($_POST['staff']);
How I need to process team post which is already coma separated and combine all of the above into final result like so:
$final = "15,16,1,8,3,4,2,5,6";