Re: comparing two texts
| From: | jenny mathew | Date: | Sat, 18 Jun 2005 16:41:31 +0000 |
| Subject: | Re: comparing two texts | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-217174@lists.php.net to get a copy of this message | ||
i want to compare two text fetched out of database and echo the result
on the webpage.i want to do it in php language and i donot want to
compare two text files ,i wanna compare two text messages (that is
fetched out from database).
thanks.
Yours,
Jenny.
On 6/18/05, Jochem Maas <jochem@iamjochem.com> wrote:
> 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
> >
>
>