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

From: Date: Fri, 20 Aug 2004 00:43:21 +0000
Subject: Re: arrays() current() next() who to use
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-194298@lists.php.net to get a copy of this message
> 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>"; > } "foreach" needs an "as", probably that was meant to say: foreach(array_slice($z['distance'], $start, 10) as $k => $v) { ... --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html

« previous php.general (#194298) next »