November 30, 2009
Convert decimal places without rounding
Category: PHP, khadlock at 1:13 pm
Here's a quick way to set the number of decimal places to 2 in PHP without rounding a number.
floor($decimal*100)/100
Leave a Reply
Here's a quick way to set the number of decimal places to 2 in PHP without rounding a number.
floor($decimal*100)/100