So I have two strings, and I want to compare and return the differences. I don't think I can use a simple preg_match() since it returns an array of all differences.
I'm having a little trouble explaining myself but I hope the following example clears it up:
So I have
String 1: AA **B** AA
String 2: AA **DA** AA
I want the return to be something similar to:
String2: 2 ==> DA
Basically I'm trying to examine the relationship between the position of B in String1 and DA in String 2
Any kind of direction would be really appreciated, Thanks!