Answers for "php checking if array is multidimensional or not"

0

php checking if array is multidimensional or not

function is_multi_array( $arr ) {
rsort( $arr );
return isset( $arr[0] ) && is_array( $arr[0] );
}
//Usage
var_dump( is_multi_array( $some_array ) );
Posted by: Guest on July-12-2021

Code answers related to "php checking if array is multidimensional or not"

Browse Popular Code Answers by Language