Hi guys,
Hope you could help me, I found out that I need my code to work recursively, but I have no idea how been trying for quite long now, so I am hoping you might help me
This is the code I have - it works - but not with the folders under uploads:
[php] <?php
$images = glob('./uploads/*.{gif,png,jpg,jpeg}', GLOB_BRACE); //formats to look for
$num_of_files = 12; //number of images to display
foreach($images as $image)
{
$num_of_files--;
if($num_of_files > -1)
echo "<li class=\"span4\"><a href=\"/foto\" class=\"thumbnails\"><img src="."'".$image."'"." /></a></li>" ; //display images
else
break;
}
?>[/php]
Could any of you kindly please rewrite it for me, to accept the folders under āuploadsā? Thank you very much!