Here is a piece of my code and I was wondering how, if possible to put an IF statement within it. Now this is just a piece
$row = mysql_fetch_array($result);
$ProductID = $row['ProductID'];
$ProductSku = $row['ProductSku'];
$ProductName = $row['ProductName'];
$ProductImageThumbnail = $row['ProductImageThumbnail'];
$ProductCategory = $row['ProductCategory'];
$ProductPrice = $row['ProductPrice'];
$ProductSubCategory = $row['ProductSubCategory'];
echo"<a href=\"product_detail.php?ProductID=$ProductID&ProductSku=$ProductSku\" class=\"listproduct\"><img src=\"graphics/$ProductImageThumbnail\" border=0 align=\"left\">
$ProductName
<br>\$$ProductPrice</a>";
I want to be able to put an IF statement in the echo" partner. There maybe some products that don't have an image, so I want to be able to put an if statement to say if image echo productImg field, IF no image put "". Hope this makes sense. I have tried doing it before but kept getting errors.
Thanks for any help.
Brett