John, Thanks. It's a question of understanding it. I can get a foreach to work, but my while doesn't.
>There's no real reason to use while() over foreach(). Why do you think you >need to use while()? Rather than ask people to code for me, I'm trying to spend a little extra time to try and learn first. My foreach works, but not my while (in any combination). $tempauthors = explode("\r\n", $mydata->AuthorList); foreach ($tempauthors as $singleauthor) # while($tempauthors = each($singleauthor)) { echo "<a href=\"http://www.foo.org$singleauthor\">$singleauthor</a> "; } "John W. Holmes" wrote: > From: "John Taylor-Johnston" <[EMAIL PROTECTED]> > > > I can do this, but want to understand how to while it: Or should I? > > > > $tempslices = explode("\r\n", $pizza); > > foreach ($tempslices as $singleslice) > > { > > echo "<a href=\"http://www.foo.org$singleslice\">$singleslice</a> "; > > } > > > > Still learning :) > > There's no real reason to use while() over foreach(). Why do you think you > need to use while()? > > ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php