I am new to PHP and developing a project called BaboonHut.com, I am coding it in PHP as the best way to learn is by just diving in. Anyway to the question, the snippet of code below currently gets the name of all the folders in a certain location and displays some information, however the items are currently displaying in alphabetical order and I would like them to display in order of folder creation. SimpleHost should be in front of Code-Game-Sleep http://www.baboonhut.com/resources/, Thanks in advance.
<?php
$dir = 'resources/';
foreach(glob($dir.'*', GLOB_ONLYDIR) as $resdir) {
$resdir = str_replace($dir, '', $resdir);
echo "
<div class=\"span3\">
<div class=\"tile\">
<img src=\"resources/". $resdir ."/thumbnail.png\" class=\"img-rounded\">
<h3 class=\"tile-title\">". $resdir ."</h3>
<p>"; echo include('resources/'. $resdir .'/description.txt'); echo "</p>
<a class=\"btn btn-primary btn-large btn-block\" href=\"http://www.baboonhut.com/resources/" . $resdir ."/\">More Information</a>
</div>
</div>
"
;
}
?>