note 80375 added to function.round

From: Date: Sat, 12 Jan 2008 23:40:18 +0000
Subject: note 80375 added to function.round
Groups: php.notes 
Request: Send a blank email to php-notes+get-135057@lists.php.net to get a copy of this message
Please note that the format of this functions output also depends on your locale settings. For example, if you have set your locale to some country that uses commas to separate decimal places, the output of this function also uses commas instead of dots. This might be a problem when you are feeding the rounded float number into a database, which requires you to separate decimal places with dots. See it in action: <?php echo round('3.5558', 2); setlocale(constant('LC_ALL'), 'et_EE.UTF-8'); echo '<br />'. round('3.5558', 2); ?> The output will be: 3.56 3,56 ---- Server IP: 194.145.210.3 Probable Submitter: 129.67.89.74 ---- Manual Page -- http://www.php.net/manual/en/function.round.php Edit -- https://master.php.net/note/edit/80375 Del: integrated -- https://master.php.net/note/delete/80375/integrated Del: useless -- https://master.php.net/note/delete/80375/useless Del: bad code -- https://master.php.net/note/delete/80375/bad+code Del: spam -- https://master.php.net/note/delete/80375/spam Del: non-english -- https://master.php.net/note/delete/80375/non-english Del: in docs -- https://master.php.net/note/delete/80375/in+docs Del: other reasons-- https://master.php.net/note/delete/80375 Reject -- https://master.php.net/note/reject/80375 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#135057) next »