Jump to content

Deleting duplicates within a string?


Michdd

Recommended Posts

Is it possible, or is there some function that will delete duplicates of a set string?

 

Like if I have:

 

$string = "abcabcabcabcabc";

 

And I want to get rid of all duplicates, so it will make it:

 

"abc" by deleting all duplicates. But where I can give it the parameters for what the duplicate is.

Link to comment
https://forums.phpfreaks.com/topic/128762-deleting-duplicates-within-a-string/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.