I'm trying to unset the array if the Array values are empty in the multidimensional array. Here's my Array:
Array
(
[main] => Array
(
[0] => Array
(
[title] => df
[link] => fdf
)
[1] => Array
(
[title] =>
[link] =>
)
[2] => Array
(
[title] =>
[link] =>
)
)
)
My PHP Code:
foreach($array as $key => $value){
if(empty($value)){
unset($menuDataJson[$key]);
}
}
But it doesn't work...
mainarray??