Hi,
I cannot work out how to display an image depending on the vaule of a product($idd):
foreach ($response['products'] as $product)
{
if($filter != "all" && $bb[$product['product-id']['value']] && $bb[$product['product-id']['value']][0] != $filter) continue;
$r = array(); $idd = 0; $ca = 0;
foreach($product as $key=>$value)
{
if($key == "product-id")
{
$idd = (int)$value['value'];
$r[0] = $idd?"<input type='radio' name='product_id' value='" . $idd . "'/>":"0 ";
//price//
$r[4] = $bb[$idd]?$bb[$idd][3]:"ID";
//info//
$r[5] = "<a href='checker/info.php?id=" .$idd. "'; rel=\"shadowbox;width=400;height=200\" class=\"option\"'><img src=\"http://www.flipconnect.co.uk/images/more-info.gif\" style=\"border:none; padding-top:24px;\" alt=\"more information about this pack\" /></a>";
//buy
$r[6] = "<a href='checker/next.php?id=" . $idd . "&postcode=".$postcode."&speed=".$phone."'><img src=\"http://www.flipconnect.co.uk/images/buy-now.gif\" style=\"border:none\" alt=\"buy this package\" /></a>";
}
I'm thinking it should tak the form of:
$r[0] = if ($idd == 1021) echo "IMAGE URL": echo "";
But doesn't work, by the way all the $idd are stored in an array with a load of othewr info.