how do i round in php with keeping the two zeros

后端 未结 3 841
感动是毒
感动是毒 2021-01-03 21:13

I have this php


and the $price maybe 1.0000

i want 1.00

3条回答
  •  庸人自扰
    2021-01-03 22:17

    The following printf() call should work for you:

    
    

    The documentation for this syntax is best described on the sprintf() page.

提交回复
热议问题