|
Posted by Andy Jeffries on 06/21/06 10:00
On Wed, 21 Jun 2006 02:56:37 -0700, Csaba Gabor wrote:
> One way to do this is to replace all spacing chars with \n, write the
> strings to two files, and then run diff (FC on my Win XP Pro = file
> compare), collecting the output. Does anyone happen to have PHP code for
> this where I don't have to write files? Note that the diff is on words of
> the strings and not characters.
http://pear.php.net/package/Text_Diff/
The code in that PEAR library may give you a starting point to
implementing it in PHP rather than calling fc.
Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos
Navigation:
[Reply to this message]
|