note 40367 deleted from function.abs by hholzgra

From: Date: Sun, 15 Apr 2012 19:26:14 +0000
Subject: note 40367 deleted from function.abs by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187140@lists.php.net to get a copy of this message
Note Submitter: mbender at duforu dot com ---- In reference to the previous code sample the int_val function is actually intval() [http://us4.php.net/manual/en/function.intval.php]: <?php if(!is_numeric($range))//checks for numeric input { $range=1; } //sets $range to integer 1 if input is anything other than a numeric value if(!int($range))//checks to make sure it is an integer (not decimal) { $range=intval($range) // not -> int_val($range); }//if a decimal- sets $range to integer value $range=abs($range);//sets value to positive whole number ?>

« previous php.notes (#187140) next »