note 108805 deleted from function.is-int by googleguy

From: Date: Wed, 19 Jun 2013 05:56:23 +0000
Subject: note 108805 deleted from function.is-int by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-195269@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- Simple checking for integer: <?php if (strval(intval($var)) == strval($var)) { // $var is integer } ?> This return true if and only if $var is really integer. Without letters next to it, without "+" sign etc. We can use it in mysql query for example.

« previous php.notes (#195269) next »