Re: check for a number

From: Date: Wed, 04 Sep 2002 20:08:48 +0000
Subject: Re: check for a number
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-115228@lists.php.net to get a copy of this message
> I am using > substr("$f", 0, 1); > to get the first character of a string but what to be able to tell if > the first character is a digit or a letter is there a way to do this? ereg( "^[0-9]", $f ) will let you know if the first character is a digit or not... Chris

« previous php.general (#115228) next »