note 100404 deleted from function.in-array by danbrown

From: Date: Wed, 13 Oct 2010 21:44:42 +0000
Subject: note 100404 deleted from function.in-array by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173193@lists.php.net to get a copy of this message
Note Submitter: deadmedic at SPAMymail dot com ---- ctulek is correct, but in_array offers a strict check too; <?php $arrray = array(0,1,2,3,4,5); if (in_array(NULL, $array, true)) { // note third parameter $strict echo 'NULL is in $array.'; } else { echo 'NULL is not in $array.'; } // NULL is not in $array. ?>

« previous php.notes (#173193) next »