note 19073 added to function.in-array
| From: | jonas at delfs dot dk | Date: | Thu, 14 Feb 2002 22:38:56 +0000 |
| Subject: | note 19073 added to function.in-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26623@lists.php.net to get a copy of this message | ||
Have in mind that a string ends up in a(int)0 if you try to typecast it to an integer.
This means that this line prints "In array":
print in_array(0, array('first', 'second')) ? "In array" : "Not
in array";
--
http://www.php.net/manual/en/function.in-array.php
http://master.php.net/manage/user-notes.php?action=edit+19073
http://master.php.net/manage/user-notes.php?action=delete+19073
http://master.php.net/manage/user-notes.php?action=reject+19073