Mr-Trainor
09-03-2013, 06:56 PM
Ok, so earlier this year I made this page (with the help of a tutorial I found online and just playing around with it and editing it) and basically what I'm trying to do is make a page where you can find new catalogue icons uploaded to Habbo. So here's what it is at the moment: (or click here to see how it looks, i.e. the layout of it (http://mr-trainor.net/rv/testtttt.php))
<?php
$handle = opendir(dirname(realpath(__FILE__)).'/directory/');
while($file = readdir($handle)){
if($file !== '.' && $file !== '..'){
echo '<img src="http://images.habbo.com/c_images/catalogue/'.$file.'" border="0" /> '.$file.'<br />';
}
}
?>
But what I want to do is order them so that they show up in order of their number, i.e. 1,2,3... 178,179 and so on. So if anyone can help with that, it'd be much appreciated :D! I have very little knowledge of PHP and everything I've tried has failed :(.
<?php
$handle = opendir(dirname(realpath(__FILE__)).'/directory/');
while($file = readdir($handle)){
if($file !== '.' && $file !== '..'){
echo '<img src="http://images.habbo.com/c_images/catalogue/'.$file.'" border="0" /> '.$file.'<br />';
}
}
?>
But what I want to do is order them so that they show up in order of their number, i.e. 1,2,3... 178,179 and so on. So if anyone can help with that, it'd be much appreciated :D! I have very little knowledge of PHP and everything I've tried has failed :(.