Skip to main content

PHP – Remove Repeated Words From String

Usually we do remove duplicate words from a text using array functions etc, but it’s quite slow doing that way because of the size of the text. The fastest way to achieve the same result is PHP regex. You can remove duplicate words using PHP regular expressions with preg_replace. Below is a complete PHP example code using regular expression to remove duplicate words from a text using PHP.

(more…)

Read More

WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera