in reply to Re: Re: terrible code about array matching...
in thread terrible code about array matching...
That's a bit dangerous isn't it?
In general yes, it is dangerous and as you suggest it's important to chose a separator that you knew could not occur in the data.
In the specific case of my suggestion, (which possibly wasn't clear) I was assuming the arrays had been populated by the original posters' code which validated each argument before pushing onto the array. I was merely proposing to replace the loop which compared the arrays.
The other problem with my code as a general solution is that it doesn't scale well. Once again though, in the context of what the poster was trying to do I think it's reasonable.
|
|---|