Home / PHP Tips Generated By ChatGPT / Checking if a Variable is an Array in PHP Use is_array() to find out whether a variable is an array. Source Code $yes = array('this', 'is', 'an array'); echo is_array($yes) ? 'Array' : 'not an Array';