Craig Westerman wrote:
> What am I doing wrong? I get parse error between first echo statement and
> else.
>
> Thanks
>
> Craig ><>
> [EMAIL PROTECTED]
>
>
> <?php
> $fn = "image.gif";
> if (!file_exists($fn)) {
> echo "<img src=noimageexists.gif>";
> else
> echo "<img src=$fn>";
> }
> ?>
>
You've got your semicolons in the wrong spots. Try:
<?php
$fn = "image.gif";
if (!file_exists($fn))
{
echo "<img src=noimageexists.gif>";
}
else
{
echo "<img src=$fn>";
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php