in reply to To remove duplicate value from an array
Your problem is on line 42.
Oh, I'm sorry, was there a question somewhere in there? One which can't be answered by checking the Q&A section? If so, maybe you should make it slightly more explicit.
Update: right, posted in CUFP (thanks for the nudge BrowserUk), so no real need for a question. It's still a bit of waste of bits if you ask me, given the existence of far better solutions (which the OP must be aware of, since he posted a more buggy version of this there only minutes late).