I'm trying to print an image using variables. But all I get is a blank page. here's the code <body> <?php $image='"http://www.simpsoncrazy.com/gallery/images/BartSimpson8.gif"'; print '<html><img src=$image/></html>' ?> </body> </html> Code (markup):
Hi it is very simple mistake u r making buddy You are trying to expand the value of variable $image placing it inside single quotes if u want to expand the value of the variable u should use the double qutes so ur code should be <body> <?php $image='"http://www.simpsoncrazy.com/gallery/images/BartSimpson8.gif"'; print "<html><img src=$image/></html>" ?> </body> </html> and it will work for sure cheers
In addition, you don't need the html tags flanking your image code ("<html><img src=$image/></html>"since you already have a body tag above this statement.