I want to create an array and if a certain variable matches any value in that array then I want to echo something. This code doesn't work. <? $hide = array(1, 2, 3, 4); if($number == $hide) { echo ""; } ?> PHP: Update, found solution, need to use in_array: <? $hide = array(1, 2, 3, 4); if(in_array($number, $hide)) { echo ""; } ?> PHP: