Re: exploding values into new variables

From: Date: Mon, 28 Oct 2002 09:17:14 +0000
Subject: Re: exploding values into new variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-121657@lists.php.net to get a copy of this message
Petre Agenbag wrote: > Hi > The manual states: > > $pizza = "piece1 piece2 piece3 piece4 piece5 piece6"; > $pieces = explode(" ", $pizza); > > So, if I want to be able to echo piece1 to the screen at a later > stage, I would go: > > echo $pieces[0]; > > or > $first_piece = $pieces[0]; > echo $first_piece; > > Right? Right! Grtz Erwin

« previous php.general (#121657) next »