note 71794 added to function.array-key-exists
| From: | mikael dot knutsson at gmail dot com | Date: | Sat, 16 Dec 2006 06:50:45 +0000 |
| Subject: | note 71794 added to function.array-key-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-120649@lists.php.net to get a copy of this message | ||
You're right, I'm not sure what I did wrong since I had a problem where array_key_exists
returned true, while
<?php
$keys = array_keys( $array );
var_dump( in_array( 'key', $keys ) );
?>
returned false. (Which does the exact same thing) I probably either messed up the array, or the
order in one of the array calls.
I rewrote the entire section where I had this problem (which was probably a good idea anyway), so I
don't have any demonstration code.
----
Server IP: 129.16.214.50
Probable Submitter: 81.235.191.71
----
Manual Page -- http://www.php.net/manual/en/function.array-key-exists.php
Edit -- https://master.php.net/note/edit/71794
Del: integrated -- https://master.php.net/note/delete/71794/integrated
Del: useless -- https://master.php.net/note/delete/71794/useless
Del: bad code -- https://master.php.net/note/delete/71794/bad+code
Del: spam -- https://master.php.net/note/delete/71794/spam
Del: non-english -- https://master.php.net/note/delete/71794/non-english
Del: in docs -- https://master.php.net/note/delete/71794/in+docs
Del: other reasons-- https://master.php.net/note/delete/71794
Reject -- https://master.php.net/note/reject/71794
Search -- https://master.php.net/manage/user-notes.php