What is the easiest way to highlight the difference between two strings in PHP?
I\'m thinking along the lines of the Stack Overflow edit history page, where new text
I would recommend looking at these awesome functions from PHP core:
similar_text — Calculate the similarity between two strings
http://www.php.net/manual/en/function.similar-text.php
levenshtein — Calculate Levenshtein distance between two strings
http://www.php.net/manual/en/function.levenshtein.php
soundex — Calculate the soundex key of a string
http://www.php.net/manual/en/function.soundex.php
metaphone — Calculate the metaphone key of a string
http://www.php.net/manual/en/function.metaphone.php