Re: Re: [PHP] Re: creating a threaded message system--sorting messages

2006-06-30 Thread Ben Liu
On 6/30/06, Adam Zey <[EMAIL PROTECTED]> wrote: I think that will work, but there is one huge improvement you can make. You are making millions of copies of your work array! Not only do you pass the entire array by value recursively, but foreach makes copies of the arrays it loops through! So wh

Re: Re: [PHP] Re: creating a threaded message system--sorting messages

2006-06-30 Thread Ben Liu
Thanks to everybody who posted on this thread. I wanted to post back the solution I came up with after removing the DB query from the recursion. In case anyone else is trying to accomplish the same thing, this is how I solved it (criticisms welcome, and note that I have not tested it extensively y