What about using array_pop to take the bottom array element from the
first one and add it to the second?
So basically you are feeding the 2nd array from the bottom of the 1st
one, and assuming garbage collection is done for each call of array_pop,
then you'd only need the memory usage of one cop
AMI> This would echo info by the order of the "id".
I would recommend doing that in your SQL, unless you're doing other
special processing.
// for ascending order
SELECT * FROM personnel ORDER BY id ASC
// for descending order, aka reverse
SELECT * FROM personnel ORDER BY id DESC
- Julie
-
Monday, June 10, 2002, 5:12:50 PM, you wrote:
> Monday, June 10, 2002, 5:07:48 PM, you wrote:
>> Does anyone have or know of a function that will take an array and
>> do array_reverse() recursively? I have the following array/structure:
> Something like this (UNTESTED!!)...
> function recurs
Monday, June 10, 2002, 5:07:48 PM, you wrote:
> Does anyone have or know of a function that will take an array and
> do array_reverse() recursively? I have the following array/structure:
Something like this (UNTESTED!!)...
function recursive_array_reverse($arr)
{
foreach ($arr as $key =>
4 matches
Mail list logo