I am trying to skip key and it's value if empty.
Following example key f
is empty and I want to remove that.
$array1 = array("a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5,"f"=>"","i"=>0);
Expected array in laravel
array
'a' => int 1
'b' => int 2
'c' => int 3
'd' => int 4
'e' => int 5
'i' => int 0
I have tried many way like taking if conditions, and array_filter but still not worked
via Chebli Mohamed
1 commentaire:
PHP copying or moving a file
Insert XML Data to MySQL Table using Python
Factorial Program in Python
Django Simple File Upload
How to convert MySQL query result to JSON in Python
Enregistrer un commentaire