php - Can't unset rows in my array -
i'm trying delete empty rows in arrays, can achieve that. need help.
here's i've tried :
$specialites = serialize($_post['specialite']); foreach($specialites $specialite) { if($specialite=='') unset($specialites[$specialite]); }
but every time, error (blank page). need please. thank !
i check 1 problem serialize
called first before foreach
, actual problem. need this:-
$specialites = $_post['specialite']; foreach($specialites $key=> $special) { if(empty($special) || $special == '') unset($specialites[$key]); } $specialites = serialize($specialites);
note:- if called serialize
on variable no more array type variable.
Comments
Post a Comment