How do I check a string for it to only contain numbers?

>> 

  if(!ereg("([0-9]+)",$string)){

    print "It contains characters other than numbers";

  }else{

    print "Only numbers";

  }

<<

Can anyone give some feedback...

regards,
Bart



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to