I have this snippet and there are 3 images and 3 folders in the directory. It echos the images just fine but it also gives me this error for each of the folders.
Notice: Undefined index: extension in D:\Data\Websites\wamp\www\StephsSite\PHP\manage.php on line 119
What i want to do is have it so if it finds a file with no extension(a folder) display an static image. How would i achieve this?
$path_info = pathinfo($dir.$file);
$extension = $path_info['extension'];
if($extension) {
echo "<img class=\"thumbnail\" src=\"".$dir.$file."\" />\n";
}