I want that real numbers would be for example 12.92, but not 12.9241. Is it possible to do like that?
See Question&Answers more detail:osI want that real numbers would be for example 12.92, but not 12.9241. Is it possible to do like that?
See Question&Answers more detail:osIn PHP, try number_format
:
$n = 1234.5678;
// Two decimal places, using '.' for the decimal separator
// and ',' for the thousands separator.
$formatted = number_format($n, 2, '.', ',');
// 1,234.57