Re: Re: stoping a while statement

From: Date: Wed, 10 Oct 2001 08:46:47 +0000
Subject: Re: Re: stoping a while statement
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-70594@lists.php.net to get a copy of this message
I just wanted to show him the loop usage.... "Jason Brooke" <jason@qgl.org> wrote in message news:03d101c1515f$8a1db430$0100a8c0@co3040297a... > 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;} > > } > > >

« previous php.general (#70594) next »