Re: note 11828 added to function.array-shift.php
| From: | Jesus M. Castagnetto | Date: | Thu, 08 Mar 2001 22:45:56 +0000 |
| Subject: | Re: note 11828 added to function.array-shift.php | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-12081@lists.php.net to get a copy of this message | ||
Not really. Using PHP 4.0.4pl1 (Solaris 2.6) and the
following code:
$a = array ("one"=>"a", "dos"=>"b",
"san"=>"c");
print_r($a);
$v = array_shift($a);
echo "popped: $v\n";
print_r($a);
The output is:
Array
(
[one] => a
[dos] => b
[san] => c
)
popped: a
Array
(
[dos] => b
[san] => c
)
You might want to check and see what OS/PHP version
you are using, and go to bugs.php.net to see if there
is already a bug report on this matter, or submit one
if there is none.
Your note will be removed.
--- deliberate_muse@hotmail.com wrote:
> This function does not seem to keep the keys of the
> array you shift. E.G. if you array keys are "one",
> "two", "three" and you shift off the top element
> your keys are now 0, 1.
>
>
>
http://www.php.net/manual/en/function.array-shift.php
>
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-notes-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-notes-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
--- Jesus M. Castagnetto <jmcastagnetto@php.net>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/