sprintf("%01.2f", $price );
Example usage:
sprintf("%01.2f", 10 ); // 10.00
sprintf("%01.2f", 10.5 ); // 10.50
If you found this article useful, help me out by leaving a comment below and clicking the Like button.
sprintf("%01.2f", $price );
Example usage:
sprintf("%01.2f", 10 ); // 10.00
sprintf("%01.2f", 10.5 ); // 10.50
If you found this article useful, help me out by leaving a comment below and clicking the Like button.