Remove Repeated Words in String – PHP


webduos

Usually we do remove duplicate words from a string using array functions etc, But it’s very slow doing that way because of the size of the string. 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…

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s