Posted by Jochem Maas on 06/18/05 17:47
jenny mathew wrote:
> hello group,
> is it possible to compare two different text messages and highlight
> the difference in php.
> i mean to say that
> $text1="message 1"
> $text2="message 2"
> i want to compare both $text1 and $text2 for differences and highlight
> the differece in php.is it possible.
yes. is it easy? that depends on how far you want to go with diff'ing
(and how good you are at string manipulation :-)
this is a general problem which has been solved by very skilled people
already, I would suggest reading some more about 'diff' etc and
figure out if you can use existing tools to get what you want:
http://www.gnu.org/software/diffutils/diffutils.html
http://en.wikipedia.org/wiki/Diff
> waiting for your reply.
> thanks.
> Yours,
> Jenny
>
Navigation:
[Reply to this message]
|