Jump to content

[SOLVED] Round up to 2 dp from 1 dp


giraffemedia

Recommended Posts

Hello,

 

i'm trying to round a number up from one decimal point to two but i'm not having any success.

 

the number is 27.5 and i'd like to round it up to 27.50.

 

Can I use the round function like so...

 

$agency_discount = round((($bf_ad_rate/100) * $bf_agency_discount) ,2);

echo $agency_discount;

 

Regards

 

James

Link to comment
https://forums.phpfreaks.com/topic/121847-solved-round-up-to-2-dp-from-1-dp/
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.