![]() |
while to foreach array
Just a quick and simple snippet, im sure most of you know this one but for those who dont, enjoy.
PHP Code:
0 - result0 1 - result1 2 - result2 3 - result3 4 - result4 etc.... 5 - result5 |
But why do you need the second loop? You could use a counter variable, and increment it inside the first while loop to print the index.
|
Quote:
PHP Code:
|
hmm, thanks!
|
| All times are GMT +1. The time now is 06:13 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.