note 26745 added to function.intval

From: Date: Mon, 11 Nov 2002 17:24:52 +0000
Subject: note 26745 added to function.intval
Groups: php.notes 
Request: Send a blank email to php-notes+get-39302@lists.php.net to get a copy of this message
intvar() will take a variable an chop off everything when it hits a non-int character For example: $var=intval("122a5"); //$var==122 example 2: $var=intval("122.5"); //$var==122 This is nice if you want to turn a double into an int automatically rounding down -- http://www.php.net/manual/en/function.intval.php http://master.php.net/manage/user-notes.php?action=edit+26745 http://master.php.net/manage/user-notes.php?action=delete+26745 http://master.php.net/manage/user-notes.php?action=reject+26745

« previous php.notes (#39302) next »