I get a number from database and this number might be either float or int. I need to set the decimal precision of the number to 3>
float
int
3>
$num=5.1239; $testnum=intval($num*1000)/1000; echo $testnum; //return 5.123