In your code, it does not matter which name you use. It is the looping construct that follows the name that determines the internal behavior.for ( $i = 0; $i < 10; $i++ ) { # C-style but could also say foreach } foreach ( @array ) { # Localizes $_ and implicitly aliases looping variable # Could also just be for }
Cheers - L~R
In reply to Re: for, foreach: any difference?
by Limbic~Region
in thread for, foreach: any difference?
by muba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |