Not skilled with PHP at all. I used old code from another site (that I did not write) to create a CMS for a client. Problem is, the directory results here are not returned alphabetically. I have read that scandir will do that, whereas readdir will not. I also know that an array or any number of sort functions would also work... I just don't know how to do it :) Any help would be much appreciated.
<select name="image1[<?print($i);?>]">
<option value="none.gif">no photo available</option>
<?
$handle = opendir($art_image);
while ($file = readdir($handle)) {
if ($file !="." && $file !="..") {
option($file,$row["image1"]);
}
}
?>
</select>