I need help in PHP Script.
I have two strings.
$string1 = "asdfgf";
$string2 = "asdfgasdg";
After removing the same character from both string once,
$string1 = "f";
$string2 = "asdg";
Another Two Strings example
$string1 = "sthnfr";
$string2 = "iserr";
Output
$string1 = "thnf"; // s and r removed
$string2 = "ier"; // s and r removed
I tried str_replace which replace all the all the characters.
Thanks for your helps
1 Answer