Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Aug 04, 2014 8:14 pm 
Offline
Senior Member

Joined: Fri May 02, 2014 5:20 pm
Posts: 58
Website: http://www.sturmkrieg.ru
Location: Richmond
I'm using scandir() on a webpage to populate a list of archived threads for a Wakaba image board. Because of the numbers, the webpage files display in a weird order.

The page is here: http://sturmkrieg.ru/img/archive/

The source is here: https://gist.github.com/Pavelovich/0f840516f6c2f14986ef


Top
   
PostPosted: Mon Aug 04, 2014 11:13 pm 
Offline
Linode Staff

Joined: Mon Jun 16, 2014 2:27 pm
Posts: 50
Location: Galloway, NJ
You can sort the scandir() array and then use your for (or foreach). Specifically, check out the 'sorting_order' parameter. PHP's guide might help you in this case:

http://php.net/manual/en/function.scandir.php


Thanks,

Dave.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group