Page 1 of 1

imaging problem ??

Posted: Sun Jul 24, 2005 9:12 am
by roehrle
In the following code case 1,2 work but I can't get the gif image to show. The dig.gif file is in the same directory.
a missing link icon shows up instead of the image.
I think it has something to do with the quotes but can't find a solution.

Code: Select all

<?php
switch ($i) {
case 0:
   echo "<img scr="dig.gif">";
   break;
case 1:
   echo "<font size=4><font color= yellow>$oldcount</font>"; 
   break;
case 2:
   echo "<font size=4><font color= red>$newcount</font>";
   break;
}
?>
JCART | Please use

Code: Select all

tags when posting php code. Review [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Posted: Sun Jul 24, 2005 9:14 am
by shiznatix
u have img scr instead of img src

Posted: Sun Jul 24, 2005 9:33 am
by John Cartwright
you have to escape your quotes

Code: Select all

echo "<img scr=\"dig.gif\">";
or

Code: Select all

echo '<img scr="dig.gif">';