问题描述
|
(int)$ref_ios_24_sign/(int)$ref_ios_24 * 100
Result : 35.7894736842
Wanted : 35.7
解决方法
两个简单的选择:
round(35.7894736842,1);
sprintf(\'%0.1f\',35.7894736842);
, $a = (int)$ref_ios_24_sign/(int)$ref_ios_24 * 100;
$a = (float)$a;
number_format ( $a,1)
PHP:number_format