You are here: checkng if string is a number « PHP « IT news, forums, messages
checkng if string is a number

Posted by blackwater dev on 11/17/05 21:37

How can I check to see if a string var holds a number? Is regex the
only way to do this? For example I have code where the var could hold
"10" or "ten". If the string is a number, do one thing, if it isn't
do something else. is_int doesn't work, intval converts "ten" to a
number so that doesn't work....

Thanks!

 

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

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