Re: check for a number

From: Date: Wed, 04 Sep 2002 20:09:13 +0000
Subject: Re: check for a number
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-115229@lists.php.net to get a copy of this message
Hi, if(is_numeric($return = substr("$f", 0, 1))) etc... You can look at the manual to get the list of the is_() functions: is_array is_bool is_callable is_double is_float is_int is_integer is_long is_null is_numeric is_object is_real is_resource is_scalar is_string etc. -- Nicos - CHAILLAN Nicolas nicos@php.net www.WorldAKT.com - Hébergement de sites Internet "Mike Fifield" <Mike.Fifield@schwab.com> a écrit dans le message de news: FFE9B7BE532CD411872F00508BDFB8FE0EB76CA0@n6010vmx.nt.schwab.com... > 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? > > > > > > begin 666 box-0.gif M1TE&.#EA"P'(#_,# P `"'Y! $```+ ```+<0 (-A(\6FAK? )HI0+U/1@*@`[ ` end begin 666 box-1.gif M1TE&.#EA"P'(#_,# P `"'Y! $```+ ```+<0 (,A(\6&ZGL (HI2LN>H*#L ` end

« previous php.general (#115229) next »