Re: syntax for checking if string contains something
| From: | CC Zona | Date: | Mon, 22 Oct 2001 21:55:06 +0000 |
| Subject: | Re: syntax for checking if string contains something | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71870@lists.php.net to get a copy of this message | ||
In article <Pine.LNX.4.21.0110230300370.19442-100000@ns.visors.com.hk>,
php_guy@visors.com.hk (Peter) wrote:
> for example
> if ($email =="")
>
> checks if the $email variable was inputted by the user.
Better: if(!empty($email))
<http://php.net/empty>
> However I was wondering how can I refine it so that it will also check if
> the $email variable contains an '@' sign?
<http://php.net/strstr>
--
CC