Reply to Re: is_numeric

Your name:

Reply:


Posted by Jason Barnett on 05/04/05 16:31

pete M wrote:
> not a php expert but have filed this bug report re validating
> is_numeric('3e0');
> http://bugs.php.net/bug.php?id=32943
>

Yeah I read that report... and as it says you're using Euler's notation.

> Now tried
>
> function isnumeric($n) {
> if (ereg("^[0-9]{1,50}.?[0-9]{0,50}$", $n)) {

if (preg_match('/^[0-9]+\.?[0-9]+$/'), $n) {

> return true;
> } else {
> return false;
> }
> }
>
> and that doent seem to work either..
>
> any ideas.. need to validate anything without 0-9 and a dot within
>
> tia
>
> Pete

[Back to original 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

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