For loop not waiting finish one item to start another item [closed]
This is my loop setup: for ($i = $current; $i < $maximum && $i < $total; $i++) {...}
I added some error_log()
inside the loop to check if all items are following the right steps order: 1. starting 2. check if exist 3. create if not exist 4. finish.
But sometimes, the log is something like this:
- starting #2008
- check if exist
- starting #2008
- check if exist
- create if not exist
- create if not exist
- finish #2008
- finish #2008
That is: it's look like the loop is running twice for the same item and create a duplicated item.
from Recent Questions - Stack Overflow https://ift.tt/2Sqkffu
https://ift.tt/eA8V8J
Comments
Post a Comment