Código PHP:
$dir=opendir('images/avatars');
$profile[avatar] .= "<select name=\"avatar\">\n";
while(false !== ($file= readdir($dir))){
$profile[avatar] .= "<option value=\"$file\">$file</option>";
}
$profile[avatar] .= "</select>\n";
closedir($dir);
Me explico, los archivos son 001.jpg, 002.jpg, 003.jpg...
Pero me los muestra desordenados ¿Cual puede ser el motivo?
Gracias