note 48946 deleted from function.array-keys by tularis
| From: | tularis@php.net | Date: | Wed, 12 Jan 2005 18:51:30 +0000 |
| Subject: | note 48946 deleted from function.array-keys by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83165@lists.php.net to get a copy of this message | ||
Note Submitter: drew at folta dot net
----
In version 4.3.8, it appears that array_keys() will preserve the array's iterator. That is...
$array = array( 'a' => 'apple', 'b' => 'banana',
'c' => 'carrot' );
reset( $array );
next( $array );
print "-- current key ".key($array)."\n";
array_keys( $array );
print "-- current key ".key($array)."n";
... results in ...
-- current key b
-- current key b