Quote:
Originally Posted by Backstabnoob
I thought there was some difference between something++ and ++something, just didn't know what exactly.
|
I don't know exactly how to explain it with words, but I can with this:
PHP Code:
for(new i=0; i < 15; i++)
{
// i is 0 first
// ...
// i is 14 last
}
for(new i=0; i < 15; ++i)
{
// i is 1 first
// ...
// i is 15 last
}
Both of them will loop the same number of times. The only difference is that the first one is increasing i after the function, and the second one is increasing it before.
If I am not mistaken...