Search
 
SCRIPT & CODE EXAMPLE
 

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 ) );
Comment

PREVIOUS NEXT
Code Example
Php :: how to check php version codeigniter 3 
Php :: for each php 
Php :: laravel multiple orderby 
Php :: where is php.ini file in ubuntu 
Php :: how to use plugin shortcode in wordpress template 
Php :: compare two arrays and return the difference php 
Php :: define function parameters php 
Php :: duplicate record laravel 
Php :: PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes") 
Php :: php override trait method and call it 
Php :: Yii::app()-request-get yii1 
Php :: how to execute cmd command in php 
Php :: laravel log build 
Php :: migrate specific migration file laravel 
Php :: default value date symfony entity 
Php :: laravel take value from different array by key 
Php :: PHP validation/regex for URL 
Php :: What does PEAR stands for? 
Php :: get id by url wordpress 
Php :: migration laravel 
Php :: PHP print — Output a string 
Php :: php get date between two dates 
Php :: running a php project 
Php :: how to get just the first row from a table in laravel 
Php :: check if phone number is valid php 
Php :: Readonly Properties - PHP 8.1 
Php :: laravel passport get tokenId 
Php :: send OTP php 
Php :: php read csv 
Php :: drupal set message 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =