Here's my rounding

From: Date: Fri, 28 Sep 2012 06:08:38 +0000
Subject: Here's my rounding
Groups: php.general 
Request: Send a blank email to php-general+get-319292@lists.php.net to get a copy of this message
$test2 = '253177'; echo $tes2 . " rounded to: "; $rounded_number = round($test2,-3); echo $rounded_number; Is it SUPPOSED to happy a number is sent to this little system and it's SUPPOSED to round the number up. So if the number was 144035 the system should look at it and say "Hey uo, we need to round this up" So basicially I need it to convert in thousands. Even if the total is a fraction over it still needs to ne calculated as the next thousand up. Sprru of o'm confusing you, i'm very tired. So basically, just make the last 4 numbers always round up. 255000 would be correct - 255590 would beINSORERECT as it should display 255600. Hope that helped someone to help me :-) xxx Chris

« previous php.general (#319292) next »