note 15737 added to function.is-int

From: Date: Fri, 28 Sep 2001 15:06:05 +0000
Subject: note 15737 added to function.is-int
Groups: php.notes 
Request: Send a blank email to php-notes+get-18411@lists.php.net to get a copy of this message
Of course, my function above will only work if the supplied argument is of type string. Since this is supposed to be used for validating user input (which would be of type string anyway) it shouldn't matter. If you need it to work for integer input as well, then add elseif (is_int($id)) return true; in the appropriate place. -- http://www.php.net/manual/en/function.is-int.php http://master.php.net/manage/user-notes.php?action=edit+15737 http://master.php.net/manage/user-notes.php?action=delete+15737 http://master.php.net/manage/user-notes.php?action=reject+15737

« previous php.notes (#18411) next »