개발2015. 4. 9. 17:27
300x250

<?php


$number = 1234.56;


// english notation (default)

$english_format_number = number_format($number);

// 1,235


// French notation

$nombre_format_francais = number_format($number, 2, ',', ' ');

// 1 234,56


$number = 1234.5678;


// english notation without thousands separator

$english_format_number = number_format($number, 2, '.', '');

// 1234.57


?>



** 출처 : http://php.net/manual/en/function.number-format.php

300x250
Posted by 마스타