![]() |
Sorting number reversed problem...
Good day top you all, I'm working on a script that read a folder a list directory. The files in that folder are named by number, like 0 to 200. here how it would look like : 003 002 001 010 ... How can I make my list in complete reverse order like : 010 ... 003 002 001 here is my code :
PHP Code:
|
The easiest, and quite possibly the best way, would be to use the
glob function. Please have a read of this article. Once you have that, you simply array_reverse the array, and that gives you them in reverse order. Please take a look at the following code; you would want the descending function:php Code:
|
Solved !
PHP Code:
|
| All times are GMT. The time now is 01:18 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0