Re: arrays() current() next() who to use

From: Date: Fri, 20 Aug 2004 00:38:41 +0000
Subject: Re: arrays() current() next() who to use
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-194297@lists.php.net to get a copy of this message
> Well, this is the hard way to do things, and very inefficient but: > > foreach(array_slice($z['distance'], $start, 10) { > //... > } If you think there's a better way of doing it I would like to hear it. However this is resulting in an Parse error on the foreach line: foreach(array_slice($z['distance'], $start, 10)) { $newuser = $z['user'][$k]; echo $newuser . " - " . $v . "<br>"; }

« previous php.general (#194297) next »