We can check a variable with the help of is_array() function in PHP. It's return true if variable is an array and return false otherwise.

BY Best Interview Question ON 13 Jan 2019

Example

$var = array('X','Y','Z');
if (is_array($var))
echo 'It is an array.';
else
echo 'It is not an array.';