To Logan:

There's also a simple non-regexp way to convert a (form) value into an integer if it consists of numbers only - although with a trap (see below):

if ($_POST["number"] == (int)$_POST["number"]) $_POST["number"] = (int)$_POST["number"];

The "traps" (or "side effects") appear with values like "" (empty string) and false (boolean), which are converted to 0 (integer). But in certain cases this might be desirable or/and usefull ;-)

Solutions like

if (($_POST["number"] + 1 - 1) == $_POST["number"]) ...

falls into the same category.
----
Manual Page -- [url]http://www.php.net/manual/en/function.is-int.php[/url]
Edit Note -- [url]http://master.php.net/manage/user-notes.php?action=edit+33727[/url]
Delete Note -- [url]http://master.php.net/manage/user-notes.php?action=delete+33727&report=yes[/url]
Reject Note -- [url]http://master.php.net/manage/user-notes.php?action=reject+33727&report=yes[/url]