Sorry! Take another look, I've updated the previous answer.
With map, the value that gets passed out it the last value in the code block. In your case it was the $i++ expression, hence the counts you got. Add the new last line I indicate above and it should fix that. I didn't notice that the first time.
I still think this is an iffy use of map though.
In reply to Re: Re: Re: Using map
by BrowserUk
in thread Using map
by maderman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |