You are here: Re: [PHP] comparing two texts « PHP « IT news, forums, messages
Re: [PHP] comparing two texts

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация