Forum Moderators: coopster
The above script I put together with comments from this thread and it works great! Only problem is, I can have a scenerio where based on rounding <> .05 I would like it to read "FREE!" instead of the current wording. One more if statement. I have tried several scenerios and could not get it to work correctly. Any advice?
Thanks for all your help!
jd
This is untested so it may not work but just a thought.
<? if ($row->rebateprice <= 0.01)
{$row->rebateprice = "($row->rebateprice)";
$cost = "not just free, you make:"; $color = '#CC0000'; }
elseif ($row->rebateprice => 0.01 && $row->rebateprice <= 0.05)
{$row->rebateprice = "($row->rebateprice)";
$cost = "Free! Your cost:"; $color = '#CC0000'; }
else {$cost = "Your cost:"; $color = '#000000'; }
print "$cost <font color='$color'>$row->rebateprice</font>";?>
With this error: Parse error: parse error, unexpected T_DOUBLE_ARROW
<? if ($row->rebateprice < 0.00)
{$row->rebateprice = "($row->rebateprice)";
print "not just free, you make: <font color='#CC0000'>$row->rebateprice</font>"; }
elseif ($row->rebateprice == 0.00)
{$row->rebateprice = "($row->rebateprice)";
print "Free! Your cost: <font color='#CC0000'>$row->rebateprice</font>"; }
elseif ($row->rebateprice > 0.00)
{$row->rebateprice = "$row->rebateprice";
print "Your cost: <font color='#000000'>$row->rebateprice</font>"; }?>
jd