PHP How to check whether a variable is an array – PHP May 3, 2011 Pramod T P Leave a comment <?php $array = array('this', 'is', 'an array'); echo is_array($array) ? 'True' : 'False'; // True echo " "; $var = 'this is a string'; echo is_array($no) ? 'True' : 'False'; // False ?>