php - Display single picture from the webroot folder -
I am trying to display an image from the webroot folder: My code is here: Keep your echo image out of your foreach banner . Putting it in an array but what happens here, it is displaying two images with the same name.
& lt; Div id = "banner-left-content" & gt; & Lt ;? Php $ ab [] = Array (); Foreach (Globe ('./banner / thumbs /*.*') as $ filename) {$ ab = array ($ filename); Foreign Currency ($ AB $ as $) {$ listImages [] = $ imagename; Echo "& lt; img src = '$ list images [0]' width = '200' height = '300' / & gt;"; }}? & Gt; & Lt; / Div & gt;
< Code> & lt; Div id = "banner-left-content" & gt; & Lt ;? Php $ ab [] = Array (); Foreach (Globe ('./banner / thumbs /*.*') as $ filename) {$ ab = array ($ filename); Foreign Currency ($ AB $ as $) {$ listImages [] = $ imagename; }} Echo "& lt; img src = '$ list images [0]' width = '200' height = '300' / & gt;"; ? & Gt; & Lt; / Div & gt;
Comments
Post a Comment