[ create a new paste ] login | about

Link: http://codepad.org/ZSRhKuUN    [ raw code | output | fork ]

martin@mustbebuilt.co.uk - PHP, pasted on Jun 25:
1
2
3
4
<?php
$price = 1.252525;
print(number_format($price, 2)); // outputs 1.25
?>


Output:
1
1.25


Create a new paste based on this one


Comments: