note 6783 deleted from in_array by ronabop

From: Date: Wed, 21 Mar 2001 06:08:28 +0000
Subject: note 6783 deleted from in_array by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-12614@lists.php.net to get a copy of this message
$a = array("foo", "bar"); <br> if(in_array("bar", $a)) print current($a); // I think this should print 1 IMO, since in array returns bool, and we really need an int which is where the first occurance of "bar" appears in the array.

« previous php.notes (#12614) next »