This snippet will return true is the parameter is a multidimensional array, else it will return false. It will also return false if the parameter is not a array.
Example of use:
if (is_multi_array($a))
echo 'Multi!';
else
echo 'Not multi!';
function is_multi_array($arr)
{
if (!is_array($arr)) return false;
$multi = array_filter($arr, 'is_array');
return count($multi) > 0 ? true : false;
}
Mail this!
- Comments (0)
- PingBacks (0)
- TrackBacks (0)


» Latest comments