Re: comparing two texts

From: Date: Sun, 19 Jun 2005 11:08:14 +0000
Subject: Re: comparing two texts
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-217190@lists.php.net to get a copy of this message
> Untested, very crude: > > <?php > $maxlen = max(strlen($text1), strlen($text2)); > for ($i = 0; $i < $maxlen; $i++){ > if (@$text1[$i] == @$text2[$i]) echo @$text1[$i]; > else @echo "<font color=red>$text1[$i]|$text2[$i]</font>"; > } > ?> 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<http://larger.is>there any other efficient method.

« previous php.general (#217190) next »