note 30578 added to function.in-array
| From: | raphinou at yahoo dot Com | Date: | Sat, 22 Mar 2003 21:45:10 +0000 |
| Subject: | note 30578 added to function.in-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45653@lists.php.net to get a copy of this message | ||
If the haystack contains the boolean true, in_array returns true!!
Check this (PHP 4.2.3-8 debian package) :
<?php
$r=array("fzsgsdgsd","reazrazr","rezarzearzae",true);
$ret=in_array("tsuser_id",$r);
print "<H1>__ $ret __</H1>";
}
?>
--
http://www.php.net/manual/en/function.in-array.php
http://master.php.net/manage/user-notes.php?action=edit+30578
http://master.php.net/manage/user-notes.php?action=delete+30578
http://master.php.net/manage/user-notes.php?action=reject+30578