|
Posted by Janwillem Borleffs on 06/15/05 19:28
Captain Dondo wrote:
> 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....
>
Something like this?
for ($i = 0, $count = count($array), $last = $count - 1;
$i < $count; $i++) {
$last_value = $array[$last][0];
$current_value = $array[$i][0];
$array[$last][0] = $current_value;
$array[$i][0] = $last_value;
}
JW
Navigation:
[Reply to this message]
|