note 77572 added to function.round

From: Date: Tue, 04 Sep 2007 16:31:51 +0000
Subject: note 77572 added to function.round
Groups: php.notes 
Request: Send a blank email to php-notes+get-130172@lists.php.net to get a copy of this message
to mark at customcartons dot com dot au found your roundup very useful, the only problem is if the value passed is 0.00 as it roundsup to 0.01 which may not be desired. I modified the return statement to: return ($value>0) ? round($value+$offset,$dp) : '0.00'; regards James ---- Server IP: 69.147.83.197 Probable Submitter: 193.36.79.207 ---- Manual Page -- http://www.php.net/manual/en/function.round.php Edit -- https://master.php.net/note/edit/77572 Del: integrated -- https://master.php.net/note/delete/77572/integrated Del: useless -- https://master.php.net/note/delete/77572/useless Del: bad code -- https://master.php.net/note/delete/77572/bad+code Del: spam -- https://master.php.net/note/delete/77572/spam Del: non-english -- https://master.php.net/note/delete/77572/non-english Del: in docs -- https://master.php.net/note/delete/77572/in+docs Del: other reasons-- https://master.php.net/note/delete/77572 Reject -- https://master.php.net/note/reject/77572 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130172) next »