Re: pop top off a multi dimensional array

From: Date: Tue, 11 Mar 2003 10:24:55 +0000
Subject: Re: pop top off a multi dimensional array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-139109@lists.php.net to get a copy of this message
I found the answer: $w = array_shift ($_SESSION["providerarray"]["provider"]); $w = array_shift ($_SESSION["providerarray"]["priority"]); "Diana Castillo" <diana@interhotel.com> wrote in message news:20030311093050.51426.qmail@pb1.pair.com... > 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. > > >

« previous php.general (#139109) next »