Jump to content

Define exchange rate and multiple value to data


kevin66

Recommended Posts

Hi, am trying without much luck, (I am new), to define an exchange rate on the page and then mutiplying it by a value I am extracting from a mysql db.

 

I write the value as below normally but having trouble writing this entry and multiplying it by my defined exchanged rate of say 2.22.

 

<?php

if(!empty($row['Band_1_Price']))  {echo "<div class=pricing_box_right2>£".$row['Band_1_Price']."</div></div>"; }

?>

 

Thanks so much.

Exactly, but when I use it like -

 

if(!empty($row['Band_1_Price']))  {echo "<div class=pricing_box_right2>£".$row['Band_1_Price']*2.22."</div></div>"; }

 

it gives an error I think the prob is when I add the </div>

 

Can I define it first and then use when i write as I need to write it in 6 places

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.