note 10316 deleted from function.round by jeroen

From: Date: Sat, 01 Sep 2001 12:37:45 +0000
Subject: note 10316 deleted from function.round by jeroen
Groups: php.notes 
Request: Send a blank email to php-notes+get-17496@lists.php.net to get a copy of this message
I wanted to round to the nearest 1000, and this is what I did function my_rounder($value) { if ($value==0) return 0; $buffer = $value / 1000; $rounded = round($buffer); $buffer = $rounded * 1000; return $buffer; }

« previous php.notes (#17496) next »