Jump to content

Simple Decimal Rounding Issue


mjurmann

Recommended Posts

Hi guys. I'm trying to round a floating number to only 2 decimal places.  However, with the code i'm using, it isn't rounding at all.  Can someone tell me what simple error I made?

Code:

[code]echo '<br/>' . round((($row_Recordset2['rating_number']/$row_Recordset2['rating_overall'])  * 10), 2) . '/' . 10 ;[/code]
Link to comment
https://forums.phpfreaks.com/topic/27382-simple-decimal-rounding-issue/
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.