PHP - number_format and rounding

后端 未结 1 1747
长发绾君心
长发绾君心 2021-01-28 13:47

The number_format function in PHP seems to round by default. My understanding is that this function is useful for separating every three numbers with a comma. Lik

相关标签:
1条回答
  • 2021-01-28 13:53
    $a=12042.529;
    echo number_format($a,2,'.',',');
    
    0 讨论(0)
提交回复
热议问题