php 当不确定用户输入的是浮点 还是整数 还是字符串时

1 $price = (floatval($price))?intval(floatval($price)*100)/100:0;

猜你喜欢

转载自www.cnblogs.com/zongsir/p/10282396.html