rnawky
Sat 24th Apr '04, 10:25pm
how do I make a string go from 0.016546874 to 0.0165?
daemon
Sat 24th Apr '04, 11:17pm
Assuming it is an float, you can use the round() (http://php.net/round) function. Or if it is a string, you can use substr() (http://php.net/substr)
Examples:
// Round function
$new_float = round($old_float, 4);
// Substr function
$new_str = substr($old_str, 0, 6);
Lats
Sun 25th Apr '04, 8:43pm
Or...
echo "Script executed in ".number_format($time,4)." seconds";
vBulletin® v3.8.0 Release Candidate 1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.