Are you still using opendir() to loop through folders in PHP? Doesn’t that require a lot of repetitive code everytime you want to search a folder? Luckily, PHP’s glob() is a much smarter solution.
Here’s an example of echoing out some information from a folder, using the traditional opendir() function.
$dir = “/etc/php5/”;
// Open a known directory, […] http://bit.ly/bKZkPF