- floor: documentation ( source)
- number_format: documentation ( source)
- printf: documentation ( source)
<?php
$rate1 = 0.02;
$var = 1260;
$product = $var * $rate1;
// two ways to format $product
echo number_format( $product, 2),"\n";
echo printf("%.2f",floor($product));