You are here: Re: Diff for words in string « PHP Programming Language « IT news, forums, messages
Re: Diff for words in string

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]


Удаленная работа для программистов  •  Как заработать на 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

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