Re: ereg function
| From: | Rasmus Lerdorf | Date: | Fri, 31 Dec 2004 21:05:30 +0000 |
| Subject: | Re: ereg function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-205436@lists.php.net to get a copy of this message | ||
Numbers are pretty easy. You could just do:
$age = (int)$_POST['age'];
if($age > 9) do_something();
else do_something_else();
Using ereg doesn't make much sense in this case.
-Rasmus
On Fri, 31 Dec 2004, Michael Lutaaya wrote:
> I want to validate someones age. How do I do this in
> the ereg function.
>
> I also have some visitors on my site who are in
> between the ages of 7-9 so don't forget to make them
> part of the ereg function.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>