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

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

  

posted @ 2015-04-12 18:58  yo胡yo  阅读(887)  评论(0编辑  收藏  举报