Posted by Sharvil Nanavati on 2000-12-14
> Hi to everyone! > > Well, I'm working on a project about something like a message board. > Now I'm > having some trouble with the sorting algorithm. Right now I have this > PHP > code: > [...snip...] Well, I haven't done a whole lot of PHP, but I DO remember a sort function (vaguely). In fact, there are a bunch of built-in sort functions and I'm sure there's at least one that will help solve your problem. As for efficiency, I would assume the built-in functions would be pretty optimized. Then again, if you look at the standard libraries for some compilers... ;-D It's your call. Anyhow, I WOULD have gone through the code, but I haven't spent enough time with PHP (the syntax in particular) so I can't send you anything better. That and reading code requires effort; something I'm not willing to do at this point in time! :) hehehe... anyway, just check out the PHP website (php.net) and search for the sort function. Or just follow this link and have it done FOR you! :) http://www.php.net/manual/function.sort.php Hope this helps somewhat - I know it doesn't really answer the question, but it's a start I guess. Cheers, Sharvil Nanavati __________________________________________________ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/
Previous post | Next post | Timeline | Home