I wonder can anyone help me, I use this script as part of tinymce, and this displays the names of the graphics in the pics folder, but I want to show them alphabeticaly. Is this possible ?
Thanks in advance Eric
Script :
<?
echo 'var tinyMCEImageList = new Array(
';
$directory = "../pics";
if(is_dir($directory)){
$direc = opendir($directory);
$trenn = "";
while(false !== ($file = readdir($direc))){
if($file !="." && $file != ".." ){
if(is_file($directory."/".$file)){
echo $trenn;
$trenn = ",nt";
echo '["'.$file.'", "../pics/'.$file.'"]';
}
}
}
closedir($direc);
}
echo ');';
?>