The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
PHP Code:
Just trying to learn new techniques - I don't use for loops often
|
|
#2
|
||||
|
||||
|
Maybe I'm missing something, but...
PHP Code:
|
|
#3
|
||||
|
||||
|
Yep your missing the fact that totalvotes changes on each iteration of the loop. Therefore giving a changed and inaccurate percentage on each iteration. I was wondering if there was any way around it
|
|
#4
|
||||
|
||||
|
Ah, that's why it pays to look through the code!
No, I'd say two loops for that one. |
|
#5
|
||||
|
||||
|
2 loops, as $totalvots is only correct at teh end of the loop and you need that for the percentage.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|