EchoFool Posted June 17, 2010 Share Posted June 17, 2010 Hey, Say i had two strings assigned to different variables like $var = 'Hello there, how are you ?'; $var2 = 'Hello there, how are you today?'; I want to get a function automatically highlight whats different between the two by - say for example highlighting the added words in a red font. So like the result would show (after comparison) Hello there, how are you today? Is there a built in function for such a thing or is this a make your own function moment? Link to comment https://forums.phpfreaks.com/topic/205009-highlight-changes/ Share on other sites More sharing options...
gizmola Posted June 17, 2010 Share Posted June 17, 2010 This is called a "diff". There's no php built-in, but there is a PEAR package named text_diff as well as other packages based on it, you can find out there. Link to comment https://forums.phpfreaks.com/topic/205009-highlight-changes/#findComment-1073231 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.