[thelist] Dumb PHP question.

Michael Barrett mbarrett at triad.rr.com
Thu Sep 14 18:02:15 CDT 2000


Thanks all for pointing me in the right direction.
-- 
O^O
 -
Michael Barrett



One of the main bits was that there's a way to check whether certain "atoms"
are numeric which I think was [:isnum:], looking at the information here
http://www.php.net/manual/function.ereg.php it appears that using [0-9] also
works. So I would suggest something along the lines of

if (ereg("^[,.0-9]+$", $amount) {
 do something;
} else {
 complain loudly;
}






More information about the thelist mailing list