is_array : PHP array function

PHP is_array is used to find whether a variable is an array or not.

Syntax:
bool is_array($arr)

Returns TRUE if $arr is an array, FALSE otherwise.

Example: php is array


<?php
$arr1 = array('A','B');


if(is_array($arr1))
echo 'Array' 
else 
echo 'Not an Array';
?>

Output :
Array.