Jump to content

quick rounding question


webguync

Recommended Posts

I want the following to calculate two decimals to something like 97.5

 

$HS_new[] = ($row['HS_new']/55)*100;//used on 55 question exams

 

I tried

 

$HS_new[] = ($row['HS_new']/55)*100,2;//used on 55 question exams

 

but that gives me an error. What would be the correct syntax?

 

 

Link to comment
https://forums.phpfreaks.com/topic/134254-quick-rounding-question/
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.