Show Only One Decimal Place for a Number in PHP Without Rounding Up <?php $number = "20.58"; $number = substr($number,0,strpos($number,".") + 2); echo $number; //20.5 ?> Email ThisBlogThis!Share to XShare to Facebook
0 comments:
Post a Comment