sprintf %0.2f
|
<? $tax = 1.06; $subtotal = 10.94; $total = $tax + $subtotal; $fmt_total = sprintf ("%0.2f", $total); echo "$fmt_total"; ?>
|
|
|
|
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
PHP Function Reference -> Users Code Examples / Notes - > sprintf:
- sprintf
- vsprintf
|