You have already got a better approach from PeterPeiGuo but if you are curious about what's wrong in your code, here are a few things which I noticed
You definitely need to modify the approach
In reply to Re: How to match elements of array
by samarzone
in thread How to match elements of array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |