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

[PHP] array_reverse() and garbage collection

2008-12-07 Thread Richard Heyes
Hi,] So I've been thinking, because occassionally I do, about array_reverse() and how to implement it. Of course, it's entirely theoretical, because it would a total waste of time. But I'm wondering which of two methods would be best. 1. Do it "correctly" and in place. ie, loop through the the fi

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 -

[PHP] array_reverse

2002-06-22 Thread Alexander Mclean III
I have problem with array_reverse. I just want to call info from my MySQL / db / table / and display the info in reverse. here is a sample of the code: ";  echo"Full NameNick NameOptions";  while($myrow = mysql_fetch_array($result))  {  echo "".$myrow["firstname"]." ".$myrow["lastname"]."".

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 =>

[PHP] array_reverse() recursive

2002-06-10 Thread Chris Boget
Does anyone have or know of a function that will take an array and do array_reverse() recursively? I have the following array/structure: Array ( [0] => Array ( [0] => Array ( [0] => bob ) ) [1] => Array