Javascript VS PHP rounding

后端 未结 6 724
轮回少年
轮回少年 2020-12-18 05:11

I am having some problems with the way PHP and javascript round numbers. I am using PHP\'s round function and this javascript function:



        
6条回答
  •  不思量自难忘°
    2020-12-18 05:18

    php rounds to 152.78, because it sees 152.77499 which is 152.775 and in the end 152.178. can't you use rounded value from php?

提交回复
热议问题