Assuming you meant $item in each case, the difference would be in the scope of $item. In the second case it would be limited to the foreach block.
In reply to Re: Scoping of my with foreach loop
by mikeB
in thread Scoping of my with foreach loop
by uksza
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |