Re: [PHP] array_reverse() and garbage collection

2008-12-07 Thread Michael Kubler
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

Re: [PHP] array_reverse

2002-06-22 Thread Julie Meloni
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 -

Re: [PHP] array_reverse() recursive

2002-06-10 Thread Stuart Dallas
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

Re: [PHP] array_reverse() recursive

2002-06-10 Thread Stuart Dallas
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 =>