note 45652 added to function.is-numeric

From: Date: Tue, 14 Sep 2004 09:24:14 +0000
Subject: note 45652 added to function.is-numeric
Groups: php.notes 
Request: Send a blank email to php-notes+get-76659@lists.php.net to get a copy of this message
in response to joe at kewlmail dot net regarding "Please note that this function will work properly unless the user fat fingers an extra decimal in the wrong place. " if you change the line <? $money = explode(".", $userString); ?> to instead read <? $money = explode(".", $userString,2); ?> this will sort that issue; if $userString=="123.45.67" then $money[0]=="123" and $money[1]=="45.67"; ---- Manual Page -- http://www.php.net/manual/en/function.is-numeric.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45652 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45652&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45652&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#76659) next »