Свежайшие Пирожки от CakePHP по-русски

Полнейшее руководство CakePHP 1.2 на русском языке, горячие новости и полезные статьи

precision

precision (mixed $number, int $precision = 3)

This method displays a number with the specified amount of precision (decimal places). It will round in order to maintain the level of precision defined.

Простой текст
  1. <?php echo $number->precision(456.91873645, 2 ); ?>
  2. //Outputs:
  3. 456.92