Compare Two PHP Strings
I would like to implement a function that compares 2 strings and displays the different words with a different background (such as green if text is added or red if text is deleted).
This function would开发者_运维知识库 be similar to the difference between the original topic and the edited one on StackOverflow.
How would I do this?
I have a pure-PHP implementation here: Text version-control in PHP with difference highlight
You can use already written wdiff
精彩评论