Re: Probably an easy one
| From: | Joe Stump | Date: | Mon, 08 Jan 2001 18:22:03 +0000 |
| Subject: | Re: Probably an easy one | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33277@lists.php.net to get a copy of this message | ||
DOH - my bad on that one! I thought you meant 1-9 characters.
--Joe
On Mon, Jan 08, 2001 at 12:20:10PM -0600, Boget, Chris wrote:
> > I want to take a variable and make sure it has only the
> > characters 1-9 in it. anyone want to give me an example.
>
> if( ereg( "^[0-9]$+", $yourVar )) {
> echo "All numbers, only numbers";
>
> } else {
> echo "Not all numbers!";
>
> }
>
> Chris
---
Joe Stump
PHP Programmer
www.Care2.com