This is my block of PHP.
<?php
I know that this is where the array is defined.
$string =array();
$dir = opendir($filePaththumb);
while ($file = readdir($dir)) {
if (eregi("\.png",$file) || eregi("\.jpg",$file) || eregi("\.gif",$file) ) {
$string[] = $file;
}
}
I assume I should use natsort() before the code continues beyond this point.
echo "<b><font size='$font_size'>".$gallery_name."</font></b><br>";
$loop = "0";
while (sizeof($string) != 0){
$img = array_pop($string);
Can I use natsort() here?
echo "<center><a href='$filePath$img' download='$filePath$img' target='$target_thumb'><img src='$filePaththumb$img' border='0' width='100%'/><BR><IMG src='img/download.png'></a><BR><BR><BR><BR></center>";
$loop = $loop + 1;
if ($loop == $loop_end) {
echo "<br>";
$loop = "0";
}
}
?>
How can I sort images in natural order?