I have these array
Array
(
[0] => A
[1] => B
[2] => C
[3] => D
)
Array
(
[0] => A
[1] => B
[2] => C
[3] => D
)
Array
(
)
But the last array don't have any key or value, i want to remove it, please help !
Use array_filter for this task, assuming this is part of a parent array.
array_filter($arrs);
This will remove empty arrays for you.