ID:               18840
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: All
 PHP Version:      4.2.2
 New Comment:

This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


Previous Comments:
------------------------------------------------------------------------

[2002-08-09 18:32:40] [EMAIL PROTECTED]

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

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=18840&edit=1


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to