Re: funcion is_integer

From: Date: Fri, 10 Dec 2004 07:40:21 +0000
Subject: Re: funcion is_integer
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-52618@lists.php.net to get a copy of this message
Saludos: La función que necesitas, es is_numeric() o en su defecto puedes usar expresiones regulares si es que estas usando flotantes, aunque tambien aplica...solo recuerda que este tipo de funciones te regresan valores booleanos. Para más detalles lee en: http://mx2.php.net/manual/en/function.is-numeric.php On Fri, 10 Dec 2004 05:33:57 +0000, Felipe Fernandez <danielfm@teleline.es> wrote: > ¿Realmente funciona? > Tengo el siguiente codigo > > $id = substr($identificacion,2); > echo > '<br>',$id,'<>',is_integer($id),'<>',gettype($id); > > El resultado es > 17<><>string cuando en identificacion es "CT17" > > ¿Existe alguna función que me indique si el valor de una variable es > numérico, aparte de las anteriores? > > -- > PHP Spanish Localization Talk Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general.es (#52618) next »