Page 1 of 1

How to display image?

Posted: Mon Jun 20, 2005 10:37 am
by ianhull
Hi Can anyone help me display a image in my page?
The image path is stored in the database.

everytime I try <?php echo $image ?> all I see is the image path

What else do i need to do?

Thanks

Posted: Mon Jun 20, 2005 10:44 am
by phpScott

Code: Select all

echo "<img src=\"".$image."\">";
you still have to use the correct html in order display the image or anything else that would require html. You know get to embed it into your php.

Posted: Mon Jun 20, 2005 10:51 am
by ianhull
Thanks for that,

I thought that it would automatically do it.

Thanks again

Posted: Mon Jun 20, 2005 11:28 am
by phpScott
nope!

php is php, html is html.

use php to create html