Quote:
Originally Posted by Sp_lit
PHP Code:
for(i = 0; i < this.listofitems.size(); i ++)
|
This is being a little bit picky and won't really make any difference in this particular instance but it's more efficient to avoid using .size(); within an array that doesn't change value in this type of loop.
With this type of loop where you're accessing 'i' it would take less script time to do:
PHP Code:
temp.s = this.listofitems.size();
for(i = 0; i < temp.s; i ++)
This is albeit something that would be worthwhile when it comes to looping through much larger arrays, the reason being is that the .size(); function would be processed on every part of the loop, which takes longer with larger arrays.