Re: Split()

From: Date: Tue, 17 Feb 2004 16:05:06 +0000
Subject: Re: Split()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-177965@lists.php.net to get a copy of this message
John Taylor-Johnston wrote:
Can I while this? Not sure how to go about it? while ($pieces exist) { echo $pieces[i]; }
This will empty the array so you might want to do this on a copy of it depending on whether it will be needed later in the script... while (count($pieces) > 0) {
    echo array_shift($pieces);
} http://php.net/array_shift -- Stuart

« previous php.general (#177965) next »