Re: flaking out on foreach

From: Date: Tue, 27 Aug 2002 15:12:51 +0000
Subject: Re: flaking out on foreach
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-114262@lists.php.net to get a copy of this message
Don't put a semicolon after the foreach. Adam Voigt adam.voigt@cryptocomm.com On Tue, 2002-08-27 at 11:07, ROBERT MCPEAK wrote: > Why is this code: > > <?php > > $bob=array(1,2,3,5,6); > > foreach($bob as $foo); > { > echo "$foo<BR>"; > } > ?> > > Rendering only "6". That's it. Just "6". What am I missing here? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#114262) next »