Created
August 26, 2018 20:51
-
-
Save minedun6/b2f98a9cc1016769a80d41733cd29a5a to your computer and use it in GitHub Desktop.
Check weither array is multi dimensional or not
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
private function isMultiDimensionalArray($array) : bool | |
{ | |
if ( !is_array($array) ) return false; | |
return count($array) != count( $array, COUNT_RECURSIVE ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment