Re: Split()

From: Date: Tue, 17 Feb 2004 16:02:08 +0000
Subject: Re: Split()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-177964@lists.php.net to get a copy of this message
On Tue, 2004-02-17 at 11:03, John Taylor-Johnston wrote: > Can I while this? Not sure how to go about it? > > $pizza = "piece1 piece2 piece3 piece4 piece5 piece6"; > $pieces = explode(" ", $pizza); > echo $pieces[0]; // piece1 > echo $pieces[1]; // piece2 Try while(each($pieces)) or foreach($pieces as $piece) -- Adam Bregenzer adam@bregenzer.net http://adam.bregenzer.net/

« previous php.general (#177964) next »