i am trying to skip key and its value if empty .
following example "f" is key and value is empty then i want to skip that.
$array1 = array("a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5,"f"=>"","i"=>0);
like this array in laravel
array
'a' => int 1
'b' => int 2
'c' => int 3
'd' => int 4
'e' => int 5
'i' => int 0
i tried many way like taking if conditions array_filter but still not worked
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire