Of course, there is a function number_format in PHP, function prototype: string thousands_sep
) )
For example:
( $num,2).'
';
echo number_format($num,2,':').'
'; //This way of writing is wrong
echo number_format(( $num,2,':','-').'
';
?>
The output result is:
12,345,679
12,345,678,90
Warning: Wrong parameter count for number_format() in /data/homepage/test/number_format.php on line 5
12-345-678:90
http://www.bkjia.com/PHPjc/632401.html
www.bkjia.com
true