Skip to content
Advertisement

Tag: similarity

Looking for the same chars in two strings in PHP

Given two strings, what is the best approach in PHP to retrieve the characters which are in common, and those which are not? For instance, given the two strings: I would like to get something like: I saw there are word similarity functions which return a numeric value. However, I would like to retrieve each single char. My approach would

Advertisement