![]() |
What's wrong with my While Loop?
Does anyone see something wrong with the while loop below? It's only returning 1 string, when there are in fact more than 10.
PHP Code:
|
Quote:
By results, do you mean the value of $output? If so, you are not appending your results to a variables just setting the variable with each new row. |
It's an excerpt from a script I got somewhere from here. So, what exactly is wrong with it?
|
It looks like it could do with rewriting, what's it supposed to be doing ?
|
Getting the latest posts from specific forums. Like I said, I was in a hurry and just took it from some old post.
|
You are resetting it every time with your assignments. Use .= if you want to add to a string instead.
PHP Code:
|
Quote:
|
Shoot. Have to end up writing in after all, oh well. Thanks.
|
I wrote this a while back.
PHP Code:
|
Thanks Harmor. I actually already wrote one, basically the same - only I didn't know how to get the lastpostuserid. Thanks, though. :)
|
All times are GMT. The time now is 11:02 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|