note 100404 added to function.in-array

From: Date: Wed, 13 Oct 2010 20:22:56 +0000
Subject: note 100404 added to function.in-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-173190@lists.php.net to get a copy of this message
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. ?> ---- Server IP: 69.147.83.197 Probable Submitter: 81.158.204.165 ---- Manual Page -- http://www.php.net/manual/en/function.in-array.php Edit -- https://master.php.net/note/edit/100404 Del: integrated -- https://master.php.net/note/delete/100404/integrated Del: useless -- https://master.php.net/note/delete/100404/useless Del: bad code -- https://master.php.net/note/delete/100404/bad+code Del: spam -- https://master.php.net/note/delete/100404/spam Del: non-english -- https://master.php.net/note/delete/100404/non-english Del: in docs -- https://master.php.net/note/delete/100404/in+docs Del: other reasons-- https://master.php.net/note/delete/100404 Reject -- https://master.php.net/note/reject/100404 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#173190) next »