/ Published in: PHP
I use this snippet to force a number to 2 decimal places. Eg, For prices, PHP rounds the number 22.20 to 22.2. This code forces a zero on the end if there isn't 2 decimal places already.
Expand |
Embed | Plain Text
<?php ?>
You need to login to post a comment.
