Re: Only numbers
| From: | Joe Stump | Date: | Mon, 06 Nov 2000 23:24:38 +0000 |
| Subject: | Re: Only numbers | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24007@lists.php.net to get a copy of this message | ||
if(ereg("[0-9]*",$numbers_only)){
echo 'I\'m all numbers baby';
}else{
echo 'Hey only numbers!';
}
--Joe
On Mon, Nov 06, 2000 at 05:42:13PM -0600, Liam Gibbs wrote:
> Is there a way that you can make sure a string contains only numbers?
>
> Liam Gibbs
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
================================================================================
= Joe Stump joestump98@yahoo.com http://www.miester.org =
================================================================================
"Real programmers don't comment their code.
It was hard to write, it should be hard to understand."