Re: [PHP] Loop, array, life....

2002-04-03 Thread Gerard Samuel
Its always the simplest things... I moved the sql stuff for the news into the first while loop, and it seems good. Thanks for waking me up... Steve Cayford wrote: > On your first email you loop through all the news in the $newsfetch > resource. I think you need to then do a mysql_data_seek() c

Re: [PHP] Loop, array, life....

2002-04-03 Thread Steve Cayford
On your first email you loop through all the news in the $newsfetch resource. I think you need to then do a mysql_data_seek() call against that to reset it for the next time through the loop. Otherwise you'll just get a null result because you're already at the end of the data. -Steve On Wedn

Re: [PHP] Loop, array, life....

2002-04-03 Thread Christopher William Wesley
You only want to retrieve the news from your table once. So, pull pull this code: > $container[] = $message; > while (list($news, $date) = mysql_fetch_row($newsfetch)) { > $container[] = '' . $news . ''; > $container[] = ''; > } > $container[] = ''; outside of (before) this loop: