note 100653 added to function.in-array

From: Date: Thu, 28 Oct 2010 10:50:10 +0000
Subject: note 100653 added to function.in-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-173548@lists.php.net to get a copy of this message
In response to @ ctulek at gmail dot com You need to use the third parameter of the function. Then, it will also test the type of the values. $arr = array(0,1,2,3,4,5); in_array(NULL, $arr, TRUE) will return false ---- Server IP: 69.147.83.197 Probable Submitter: 201.63.210.2 ---- Manual Page -- http://www.php.net/manual/en/function.in-array.php Edit -- https://master.php.net/note/edit/100653 Del: integrated -- https://master.php.net/note/delete/100653/integrated Del: useless -- https://master.php.net/note/delete/100653/useless Del: bad code -- https://master.php.net/note/delete/100653/bad+code Del: spam -- https://master.php.net/note/delete/100653/spam Del: non-english -- https://master.php.net/note/delete/100653/non-english Del: in docs -- https://master.php.net/note/delete/100653/in+docs Del: other reasons-- https://master.php.net/note/delete/100653 Reject -- https://master.php.net/note/reject/100653 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#173548) next »