note 10774 added to is_integer

From: Date: Sun, 21 Jan 2001 22:31:18 +0000
Subject: note 10774 added to is_integer
Groups: php.notes 
Request: Send a blank email to php-notes+get-10051@lists.php.net to get a copy of this message
A good trick was pointed out for is_int() that works great with form data is using: $variable+=0; If $variable was non-numeric, it will be set to an integer 0. If it was numeric in the first place, the data will be unchanged. example: if (($f_Num += 0) == 0) { ... } http://www.php.net/manual/en/function.is-integer.php

« previous php.notes (#10051) next »