Hi
I have a series of fields being drawn from a db and displayed on the page. I would like to insert an image if the value of one of the fields == 1 otherwise no image - I can't quite get my head around the right way to do this.
I know the following syntax is wrong, but this is what I'd like it to do:
echo "<p>" . $itemname . "<br />" . $itemdescription . "<br />" . (if ($showitem == 1) echo <img src="image.jpg">; ) . "</p>";
If some kind soul could correct my syntax or tell be where I'm going wrong I'd be really grateful!