Re: Re: stoping a while statement
| From: | Jason Brooke | Date: | Wed, 10 Oct 2001 07:45:30 +0000 |
| Subject: | Re: Re: stoping a while statement | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70590@lists.php.net to get a copy of this message | ||
I can understand a loop re-write, but advising him to replace his use of
explode() with split() when there's no need to invoke the regex stuff might
not be good advice.
jason
> I total re-write:
>
> $variable="www.tester.com";
>
>
$i="www.northwesthost.com,dns1.northwesthost.com,dns2.northwesthost.com,www.
> tester.com";
>
> $domains = split(",", $i);
> while (list(, $val) == each($domains))
> {
> if ($val==$variable)
> {echo 'blah blah...';
> break;}
> }