The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I have a directory with a bunch of files in it that have filenames that look like 100.html 101.html 102.html 1001.html 1002.html 999.html etc.
I need to sort the filenames numerically. Right now, they are coming up like this: 100.html 1000.html 1001.html 1002.html 1003.html 1004.html 1005.html 1006.html 1007.html 1008.html 1009.html 101.html 1010.html 1011.html 1012.html How can I get these things sorted easily so I can process through the files in the correct order? Amy |
#2
|
||||
|
||||
![]()
in php?
you should stript the .html then you can do the sorting by integer, and afterwards add the .html again ![]() |
#3
|
||||
|
||||
![]() Quote:
![]() |
#4
|
||||
|
||||
![]()
isn't that the lazy way? ^^
but looking at php.net brought a very nice function: natsort(array &array) that does what you want regarding the description ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|