Hello
I’m trying to get the code to get the filename of all the .wmv files in a folder and link to the page which will show the video. It’s all working fine apart from it is bringing all the videos up in date order instead of alphabetical order. Can anyone help please?
[code]<?php
//Open video directory
$dir = dir(“videos”);
//List files in video directory
while (($file = $dir->read()) !== false)
{
if (eregi(".wmv", $file)) {
$file = str_replace(".wmv", “”, $file);
$file2 = str_replace(" ", “%20”, $file);
echo “<a href=videos/videoshow.php?title=” . $file2 . “>” . $file . “
”;}
}
$dir->close();
?>[/code]