I have a database that have multiple fields. i've to display one of its field in in html table. i can do it easily. but the problem is that the field i want to show may contain repeated words in a row. for eg
- john;mike;john
- john
- mike;mike;mike
now what i want to do is that i have to trim repeated words i.e if a word is more than once in a row so it should be displayed only once. e.g above will be
- john;mike
- john
- mike
i.e i don't want to show repetition when displaying record in html table. i want to make it dynamic i.e not just for 5 to 6 word. but to condemn repetition even if there thousands of records.
considering whole value of a row as a string how could i remove this using php ..
Thanks for your support in advance..