note 51860 added to function.in-array
| From: | zionglau at yahoo dot com | Date: | Wed, 13 Apr 2005 05:19:14 +0000 |
| Subject: | note 51860 added to function.in-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-87930@lists.php.net to get a copy of this message | ||
<?php
$arr = array("1a1", "1b1", "1c1", "1d1");
$str = "1e1";
if (in_array($str, $arr))
echo "Tell me why?! '1e1' == '1d1'?! <br>";
if (!in_array($str, $arr, true))
echo "IT's work with strict!<br>";
?>
----
Manual Page -- http://www.php.net/manual/en/function.in-array.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51860
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51860&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51860&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51860&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51860&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51860&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51860&report=yes
Search -- http://master.php.net/manage/user-notes.php