bool is_array ( mixed $var )
is_array() checks whether the variable is an array or not
※ available F/W version : all
Returns TRUE if $var is an array, otherwise FALSE.
<?php
$val1 = array(1, 2, 3);
$val2 = 1;
$ret1 = is_array($val1);
$ret2 = is_array($val2);
if($ret1) echo "ret1 is an array\r\n"; // OUTPUT: ret1 is an array
else echo "ret1 is NOT an array\r\n";
if($ret2) echo "ret2 is an array\r\n";
else echo "ret2 is NOT an array\r\n"; // OUTPUT: ret2 is NOT an array
?>
is_bool() / is_float() / is_int() / is_string()
This function is identical to the PHP group’s is_array().