Hi all,

So I would like a else statement that would go like this:

<?php
if ($image=="none")
echo "no image";
else
<img src="../images/<?php echo $image; ?>"> ;
?>

Obviously this does not work. Any suggestions on how to get it to work?

So if $image's value is 'none' then it echo's 'no image'
If its not then it echo's what ever the value is as an image name.
Hence displaying that image.

Hope my explanation was ok.

Only learning this stuff at the moment. Is this the right way to go about this?
Any advise welcomed.

Thanks
Gavin

<?php
  if ($image == "none")
    echo "no image";
  else
    echo '<img src="../images/' . $image . '"/>';
?>