Good luck !
*/
// setting the directory to search for mp3 files
$dir = "./mp3";
// reading the directory and inserting the mp3 files in the playlist array
$n = 0;
$playlist = array();
$fdir = opendir($dir);
while($i = readdir($fdir)) {
// if a .mp3 string is found, add the file to the array
if (strpos(strtolower($i),".mp3") !== false) {
$playlist[$n] = $i;
$n++;
}
}
// close the directory and sort the array
closedir($fdir);
array_multisort($playlist);
// echoing the playlist to flash
echo "\n";
for ($i=0; $i\n";
}
echo "";
?>