note 26954 modified in function.intval by philip

From: Date: Wed, 26 Mar 2003 00:51:59 +0000
Subject: note 26954 modified in function.intval by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-45823@lists.php.net to get a copy of this message
[Editors note: See also is_numeric() or ctype_digit()] Translation of earlier French posting: I've tried all the previous examples to determine whether a string is a number, but nothing works, for example, if I try the month code "06". So, my solution is: if (($month != strtoupper($month."")) || ($month != strtolower($month.""))) { // not a number } --was-- Translation of earlier French posting: I've tried all the previous examples to determine whether a string is a number, but nothing works, for example, if I try the month code "06". So, my solution is: if (($month != strtoupper($month."")) || ($month != strtolower($month.""))) { // not a number } http://www.php.net/manual/en/function.intval.php

« previous php.notes (#45823) next »