If an "index" is required use $index as the identifier. If a count is required you need to pre-increment the value or set it to 1 initially.
Yes, I know it is trivial sample code that doesn't matter, but good habits are worth acquiring. And distinguishing between a (1 based) count and a (0 based) index is a habit well worth acquiring!
In reply to Re^2: how can i get the index value of array during runtime
by GrandFather
in thread how can i get the index value of array during runtime
by phemal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |