ID:               43733
 User updated by:  lakinekaki at gmail dot com
 Reported By:      lakinekaki at gmail dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Arrays related
 Operating System: Linux
 PHP Version:      4.4.7
 New Comment:

I am devoid of reading comprehension. The very first line in the manual
said that function returns all array keys. However, example was little
confusing and led me to believe the opposite.


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

[2008-01-03 01:05:53] lakinekaki at gmail dot com

Description:
------------
http://us2.php.net/function.array-keys

when compared with result c from example on above page, it seems that
what i get is not expected result. array-keys function tests against all
keys in all sub arrays!

Reproduce code:
---------------
<?php
//example array of simple website navigation structure

$array = array("about.php","contact.php","projects.php" =>
array("project_1.php" =>
array("project_1a.php","project_1b.php"),"project_2.php"));

if(in_array('project_1.php',array_keys($array)))echo 'not working as
expected';
?>


Expected result:
----------------
I expect no output, but see 'not working as expected' 



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


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

Reply via email to