How to remove blank array from an array?
How to remove blank array from an array?
like: you have an array where a key is blank and you want to remove the array from the tree of array
then you can use this function like:
function unsetblankarray($array)
{
foreach($array as $key=>$value)
{
if(!@$array[$key]['field'])
{
unset($array[$key]);
}
}
return $array;
}
like: you have an array where a key is blank and you want to remove the array from the tree of array
then you can use this function like:
function unsetblankarray($array)
{
foreach($array as $key=>$value)
{
if(!@$array[$key]['field'])
{
unset($array[$key]);
}
}
return $array;
}
Comments
Post a Comment