![]() |
foreach missing element!
PHP Code:
PHP Code:
|
You are not supposed to modify the array of a for-each loop, it
would be too hard to detect insertion or removal of array members and still run the for-each loop for each member. We should add that to the wiki-docu though. btw: firefox crashed two times when typing this reply, wondering why x-x |
Custom Array's would solve a lot of these problems...
PHP Code:
NOTE: This would also have to remap array[ index ] to array.element.(@ index ) |
It's not always that simple, e.g. it must be 'thread-safe', when you call sleep() inside the loop then it must still be working once the timeout occurs. That's why it just remembers the array variable and the index, most of the time that should be ok. If you need more control then you can use a normal for-loop I guess.
|
All times are GMT +2. The time now is 12:09 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.