note 25379 added to function.floatval

From: Date: Fri, 20 Sep 2002 22:25:05 +0000
Subject: note 25379 added to function.floatval
Groups: php.notes 
Request: Send a blank email to php-notes+get-37077@lists.php.net to get a copy of this message
floatval() is using the current locale to determine its values. On an english locale floatval("4.51 pieces"); will return 4.51. But if I use setlocale("LC_ALL", "danish"); first, then floatval("4.51 pieces"); will return 4 because the decimal point in danish is a comma (,) not a dot (.) -- http://www.php.net/manual/en/function.floatval.php http://master.php.net/manage/user-notes.php?action=edit+25379 http://master.php.net/manage/user-notes.php?action=delete+25379 http://master.php.net/manage/user-notes.php?action=reject+25379

« previous php.notes (#37077) next »