note 101430 added to function.round

From: Date: Thu, 16 Dec 2010 11:05:13 +0000
Subject: note 101430 added to function.round
Groups: php.notes 
Request: Send a blank email to php-notes+get-174973@lists.php.net to get a copy of this message
Ok count() clearly doesn't work. Tested it on Ubuntu Linux. I did print count(19.525); as the expected answer would be 19.53. Well it wasn't. It was 19.52, clearly something is wrong with that. I used MySQL to fix it for me. $resQuery = MySQL_Select("SELECT ROUND(19.525,2) as mynum"); $objFormula = MySQL_Fetch_Object($resQuery); Print($objFormula->mynum); // 19.53 :D Enjoy.. ---- Server IP: 69.147.83.197 Probable Submitter: 80.57.123.182 ---- Manual Page -- http://www.php.net/manual/en/function.round.php Edit -- https://master.php.net/note/edit/101430 Del: integrated -- https://master.php.net/note/delete/101430/integrated Del: useless -- https://master.php.net/note/delete/101430/useless Del: bad code -- https://master.php.net/note/delete/101430/bad+code Del: spam -- https://master.php.net/note/delete/101430/spam Del: non-english -- https://master.php.net/note/delete/101430/non-english Del: in docs -- https://master.php.net/note/delete/101430/in+docs Del: other reasons-- https://master.php.net/note/delete/101430 Reject -- https://master.php.net/note/reject/101430 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#174973) next »