I am trying to delete array elements from an array using array_filter function. It's working fine but there is always ONE element that is not removed.
The array is constructed with array_combine using one simple array and other built with array_chunk.
Here is my code:
$arr_a = array("AAA","","CCC","");
$arr_b = array("a1","b1","a2","b2","a3","b3","a4","b4");
$arr_c = array_chunk($arr_b,2);
$c = array_combine($arr_a,$arr_c);
$limpn_url = array_filter($c);
If I'd get an error I would not bother to post here a question. But there is no error returning.
When making print_r($limpn_url);
the output is:
Array ( [AAA] => Array ( [0] => a1 [1] => b1 ) [] => Array ( [0] => a4 [1] => b4 ) [CCC] => Array ( [0] => a3 [1] => b3 ) )
*note the [] => Array ( [0] => a4 [1] => b4 )
That shouldn't be there. Other empty elements were deleted correctly...