Round help needed

From: Date: Fri, 28 Sep 2012 03:05:45 +0000
Subject: Round help needed
Groups: php.general 
Request: Send a blank email to php-general+get-319289@lists.php.net to get a copy of this message
Hi everyone, I'm having one of those nights where nothing is working, please help What I have is this: $rounded_number = round($test, -3); Here's the problem i'm having, I need it to increment to the nearest 1000 but it seems to only work if the number is over 500. For example: 123666 WILL round to 124000 BUT if I put 123085 (As an example) it doesn't round it, it just stays at 123085 - I know it's probably something totally ridiculously simple but i'm having a mental block tonight. Any help would really be appreciated. Chris http://www.youtube.com/user/zoolook3264

« previous php.general (#319289) next »