Re: pop top off a multi dimensional array
| From: | Ernest E Vogelsinger | Date: | Tue, 11 Mar 2003 12:15:51 +0000 |
| Subject: | Re: pop top off a multi dimensional array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139121@lists.php.net to get a copy of this message | ||
At 10:30 11.03.2003, Diana Castillo said:
--------------------[snip]--------------------
>If I have a multi dimension array like this:
>Array ( [provider] => Array ( [0] => 3 [1] => 2 [2] => 4 [3] => 1 )
>[priority] => Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 )
>how do I take off the top elements so I will only have three providers and
>three priorities left?
>If I do array_shift, it takes off all of the providers.
--------------------[snip]--------------------
You need to handle all subarray separately.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/