Jump to content

Rounding to 2 Decimal Places


Nick11380

Recommended Posts

I'm really struggling to see how to do this. The following number is being posted:

 

As of <span id="theTime"></span> GMT, the gold price per ounce</a> in the UK is £'.$results['ounce_price'];

 

I want 'ounce_price' to be rounded to decimal places but can't figure how to do this.

 

Does 'round($results,2) ' mean anything in this situation? Where can I place the code. I'm a little confused, any help would be hugely appreciated!

Link to comment
https://forums.phpfreaks.com/topic/246614-rounding-to-2-decimal-places/
Share on other sites

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.