php怎么保留相除后几位小数:sprintf

$n=0.1265489;
echo sprintf("%.2f", $n); // 0.13

  

原文地址:https://www.cnblogs.com/jdhu/p/4420099.html