echo ‘<img source=“ ‘ . $dir_name . ‘/’ . $file . ‘ ”/>’ ;
One of my students spent quite a lot of time finding out why the above PHP code did not work. Actually it took me awhile also… even though it is obvious in hindsight.
In essence we are saying show an image, and the source of the image is provided via variables. So whats the problem?