Re: Re[2]: [PHP] comparing two texts

2005-06-24 Thread jenny mathew
> Today's newbie is tomorrow's Programmer. Some day > she'll maybe write that script she deemed impossible today, and contribute > it back to the community. > > Or maybe she'll some day add a PHP Module to interface directly to "diff" > somehow. Thanks Richard, for the motivation, and thanks to th

Re: Re[2]: [PHP] comparing two texts

2005-06-24 Thread Rory Browne
Folks There's no need to be quite so rude, when informing someone that you don't know of any existing PHP code(diff isn't written in PHP), that will fulfull their requirements. Jenny: Check out various PHP wikis. Most of them have a history feature, that allows you to compare current with previous

Re: Re[2]: [PHP] comparing two texts

2005-06-23 Thread Richard Lynch
On Thu, June 23, 2005 5:25 am, Tom Rogers said: > Hi, > > Thursday, June 23, 2005, 9:42:34 PM, you wrote: > . > . > . > > JM> whereas I'll happily spend an hour writing up and contemplating > someone > JM> else's problem - I don't have five minutes for people who are > expecting to be > JM> spoonfe

Re[2]: [PHP] comparing two texts

2005-06-23 Thread Tom Rogers
Hi, Thursday, June 23, 2005, 9:42:34 PM, you wrote: . . . JM> whereas I'll happily spend an hour writing up and contemplating someone JM> else's problem - I don't have five minutes for people who are expecting to be JM> spoonfed (go learn ASP and get a support contract, thanks ;-). Perhaps I mi

Re: [PHP] comparing two texts

2005-06-23 Thread Jochem Maas
Robert Cummings wrote: On Wed, 2005-06-22 at 22:55, Richard Lynch wrote: ... Well some noobs might think crude works quite well for them :) Ya want me to do Jenny's work for her for free or what?! :-) No but it seemed like Jenny did *grin*. _seemed_ ??? r u kidding :-) whereas I'l

Re: [PHP] comparing two texts

2005-06-22 Thread Robert Cummings
On Wed, 2005-06-22 at 22:55, Richard Lynch wrote: > On Sun, June 19, 2005 8:33 am, Robert Cummings said: > > On Sun, 2005-06-19 at 09:22, M. Sokolewicz wrote: > >> jenny mathew wrote: > >> >>Untested, very crude: >^^ > > > It's a bit of a dirty hack though. If I compare a 2

Re: [PHP] comparing two texts

2005-06-22 Thread Richard Lynch
On Sun, June 19, 2005 8:33 am, Robert Cummings said: > On Sun, 2005-06-19 at 09:22, M. Sokolewicz wrote: >> jenny mathew wrote: >> >>Untested, very crude: ^^ > It's a bit of a dirty hack though. If I compare a 2 character text > against a 40k text, the error handler will be

Re: [PHP] comparing two texts

2005-06-20 Thread JamesBenson
I saw a function in the php manual the other day which displays the difference as a percentage, for instance two strings, foo foos would be maybe 90% match, not sure thats what you mean though, you can always do a str_replace like so, $string1 = 'foo'; $string2 = 'foos'; $string = (str_re

Re: [PHP] comparing two texts

2005-06-20 Thread Jochem Maas
jenny mathew wrote: so,what what should i conclude .it is not possible to compare two texts and hight the difference at this moment. 1. conclude whatever the you like 2. 'hight' is not an english word (I guess you mean highlight) 3. actually it is possible but you have to write some code 4

Re: [PHP] comparing two texts

2005-06-19 Thread jenny mathew
so,what what should i conclude .it is not possible to compare two texts and hight the difference at this moment. thanks. Yours , Jenny On 6/19/05, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Sun, 2005-06-19 at 12:33, M. Sokolewicz wrote: > > Robert Cummings wrote: > > > On Sun, 2005-06-1

Re: [PHP] comparing two texts

2005-06-19 Thread Robert Cummings
On Sun, 2005-06-19 at 12:33, M. Sokolewicz wrote: > Robert Cummings wrote: > > On Sun, 2005-06-19 at 09:22, M. Sokolewicz wrote: > > > >>jenny mathew wrote: > >> > Untested, very crude: > > $maxlen = max(strlen($text1), strlen($text2)); > for ($i = 0; $i < $maxlen; $i++){ > >

Re: [PHP] comparing two texts

2005-06-19 Thread M. Sokolewicz
Robert Cummings wrote: On Sun, 2005-06-19 at 09:22, M. Sokolewicz wrote: jenny mathew wrote: Untested, very crude: $text1[$i]|$text2[$i]"; } ?> donot you think you program will just bring the server to its foot ,if the text message encountered is very large of order of 40 KB or larger.is

Re: [PHP] comparing two texts

2005-06-19 Thread Robert Cummings
On Sun, 2005-06-19 at 09:22, M. Sokolewicz wrote: > jenny mathew wrote: > >>Untested, very crude: > >> > >> >>$maxlen = max(strlen($text1), strlen($text2)); > >>for ($i = 0; $i < $maxlen; $i++){ > >>if (@$text1[$i] == @$text2[$i]) echo @$text1[$i]; > >>else @echo "$text1[$i]|$text2[$i]"; > >>} > >>

Re: [PHP] comparing two texts

2005-06-19 Thread M. Sokolewicz
jenny mathew wrote: Untested, very crude: $text1[$i]|$text2[$i]"; } ?> donot you think you program will just bring the server to its foot ,if the text message encountered is very large of order of 40 KB or larger.isthere any other efficient method. 40KB isn't large... now

Re: [PHP] comparing two texts

2005-06-19 Thread jenny mathew
> Untested, very crude: > > $maxlen = max(strlen($text1), strlen($text2)); > for ($i = 0; $i < $maxlen; $i++){ > if (@$text1[$i] == @$text2[$i]) echo @$text1[$i]; > else @echo "$text1[$i]|$text2[$i]"; > } > ?> donot you think you program will just bring the server to its foot ,if the text messa

Re: [PHP] comparing two texts

2005-06-18 Thread Edward Vermillion
On Jun 18, 2005, at 3:42 PM, Richard Lynch wrote: On Sat, June 18, 2005 3:21 am, jenny mathew said: 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 d

Re: [PHP] comparing two texts

2005-06-18 Thread Richard Lynch
On Sat, June 18, 2005 3:21 am, jenny mathew said: > 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

Re: [PHP] comparing two texts

2005-06-18 Thread Richard Lynch
On Sat, June 18, 2005 9:41 am, jenny mathew said: > 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). I belie

Re: [PHP] comparing two texts

2005-06-18 Thread jenny mathew
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 <[EMAIL PROTECTED]>

Re: [PHP] comparing two texts

2005-06-18 Thread Jochem Maas
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.

[PHP] comparing two texts

2005-06-18 Thread jenny mathew
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. waiting for your reply. thank