|
Posted by JDS on 06/15/05 23:19
On Tue, 14 Jun 2005 19:00:07 -0700, Captain Dondo wrote:
> In other words, I need to pop the first element of each subarray and
> unshift it to be the first element, while leaving the second element in
> place....
>
> I've been playing with various combinations of array_pop, array_unset, and
> so on but I am complete PHP newbie and I am throughly stuck....
>
> TIA...
To do domething like this you will need to have a temporary "holding"
array
try this...
<?php
$myarray = .... // (array from your OP, not going to retype the whole
thing)
$temparray = array_pop($myarray);
$myarray = array_merge($temparray, $myarray);
?>
Warning! Untested code. But it should work.
--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
Navigation:
[Reply to this message]
|