开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜