Quote:
|
Originally Posted by falco10291029
It's supposed to replace the with command
|
It does not replace the with command, and it is called a for-each loop.
PHP Code:
for(a: b) {
// Code
}
What it really does it cycle through an array, and set the value of b with the next index to a.
It is essentially the same as:
PHP Code:
for(i=0;i<b.size();i++) {
a = b[i];
// Code
}