|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-08-09 19:14 UTC] jmcastagnetto@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 13:00:01 2025 UTC |
I think there is a bug in an example on the in_array()'s manual page. Example 3: <?php $a = array(array('p', 'h'), array('p', 'r'), 'o'); if (in_array(array ('p', 'h'), $a)) echo "'ph' is found\n"; if (in_array(array ('f', 'i'), $a)) echo "'fi' is not found\n"; if (in_array('o', $a)) echo "'o' is found\n"; ?> // This will output: 'ph' is found 'o' is found -=-=-=-=-=- Either the message for the second "if" must be : "'fi' is found\n" or the condition must be changed as well as the output if (!in_array(array ('f', 'i'), $a)) Output: 'ph' is found 'fi' is not found 'o' is found Regards, Andrey