Hi, general coding question
I have a while statement that ends with count++. $count = 0 is defined outside the while statement.
Is there a way to place the last counted iteration as a variable? For example, if there are 8001 iterations, we set $last_count as 8001.
If so, how can I accomplish this?
Thanks
It'll be in count... the variable doesn't get unset when you leave the loop, at least in PHP.
So echo'ing $count will give me, theoretically, the last count number of 8001?
You could try it and see what happens...
If you do $count = 0 after the loop, then it'll output 0.
can you post the code you are using?
Actually, it worked! Thank you.