Jump to content

PHP Array Type?


ShoeLace1291

Recommended Posts

Is there a way to find out what the array type is?

 

Example:

$array1 = array('red', 'pizza', '14');
$array2 = array('color' => 'red', 'food' => 'pizza', 'age' => '14');

if(is_recursive($array1)){
     return TRUE;
} else if(is_multidimensional($array2){
     return TRUE;
} else {
     return FALSE;
}

Link to comment
https://forums.phpfreaks.com/topic/213203-php-array-type/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.