Re: Re: Quickly verifying single word.
| From: | Per Jessen | Date: | Thu, 05 Jun 2008 09:32:46 +0000 |
| Subject: | Re: Re: Quickly verifying single word. | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-275050@lists.php.net to get a copy of this message | ||
Usamah M. Ali wrote:
> According to your needs, it could be simply shortened to the first if:
> if (preg_match('/\s+/i', $string) === 0)
> {
> echo 'No white spaces';
> }
And you could even remove the '+'.
/Per Jessen, Zürich