Joined February 2014
·
Posted to
Find and format difference between two strings in PHP
over 1 year
ago
That's true, very good point. This can be "good enough" in a lot of cases, but if you need a more fine-tuned diff, the code will have to be modified to fit your needs.
Achievements
107 Karma
33,464 Total ProTip Views
Cub
Have at least one original jQuery or Prototype open source repo
Sure, I'll explain.
I was working on a project where users could change their profile data, but the changes were emailed to administrators for approval.
This code highlights the changes so the administrators can easily see what was changed. Much like a "diff" view in most source control tools.
Does that help? Or did you mean for me to explain how the code works?