how to check for duplicate words in textarea?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sejal17
    New Member
    • Dec 2007
    • 56

    how to check for duplicate words in textarea?

    hello
    I want to check duplicate word in textarea.In textarea,all words are separated by comma.No words are allowed with enter or white space.And the limit is only 7 words i want to insert.I want the code of this.Please help me.



    Thanks......... .
  • nathj
    Recognized Expert Contributor
    • May 2007
    • 937

    #2
    Hi,

    Well, my question to you is what have you got so far? My approach would be to split the contents of the textarea into an array. Then loop through the array and for each word I would search the array for a match.

    Have a play with the idea and post back with any questions - remember to post the code you have.

    Cheers
    nathj

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      sejal17.

      We are not a code-on-demand kind of service. If you require such a service, feel free to post a job offer in the Jobs forum.
      We are happy to help you solve problems you may be facing while writing your own code, but we will not write it for you.

      Being a full member now, and having received warnings in the past, I expect you to have read the Posting Guidelines.
      These guidelines are not optional, and we expect all members to follow them, or you may find yourself banned from these forums.
      Please make sure you do so in the future.

      To underline this I am going to close this thread. If you face any specific problems when attempting to solve this, feel free to post them in a new thread. (And keep the the guidelines in mind if you do!)

      Thank you.
      MODERATOR

      Comment

      Working...