printf: %f, %.2f
<?php printf ("Control the number of decimals in %f with %.2f\n", 5.1234, 5.1234); ?>