You are here: Re: is_nan ??? « PHP Programming Language « IT news, forums, messages
Re: is_nan ???

Posted by Martin on 10/15/61 11:23

On Sun, 07 Aug 2005 19:20:44 -0700, Martin <martinvalley@comcast.net>
wrote:

>Can someone please explain to me how I can check (in my PHP script)
>whether a user input is a number or not?
>
>I thought it would be as simple as:
>
>if(is_nan($myinputfield)){ then do something }
>
>but that doesn't seem to work.
>
>The PHP docs say that the value being passed to the is_nan function is
>defined as a float_val. Wouldn't this mean then, by definition, that
>it is a number? Can I pass a string to it?
>
>I'm very confused...


Never mind...

I see that what I want is "is_numeric()" rather than "is_nan".

A little less confused now.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация