How to know if a variable is an array() or not?
Easy with the is_array() function.
Let’s see an example of the is_array() function:
<?php
$my = array();
if (is_array($my))
echo "This is an array().";
else
echo "This is not an array().";
?>
Result:
This is an array().