Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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 ) );
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #checking #array #multidimensional
ADD COMMENT
Topic
Name
7+7 =