Fetch all files name from folder in PHP
if ($handle = opendir("C:\wamp\www\yoursite/download/")) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
echo "<b>".preg_replace('/\\.[^.\\s]{3,4}$/', '', $entry)."</b>";
}
}
closedir($handle);
}
Thats it.... Enjoy Chandresh rana's Coding... :)
1 comment:
Could you explain what the pre_greplace is doing?
Post a Comment