Reply to Re: [PHP] problem encountered with stristr-based function

Your name:

Reply:


Posted by David Grant on 01/20/06 16:53

George,

George Pitcher wrote:
> For info, I am trying to highlight search terms in results.

If you're searching and replacing within HTML, you ought to be aware of
issues if someone's search term happens to be an HTML tag or attribute.
For example, Alice might search for "href" and get the following:

<a <b>href</b>="URL">Text</a>

back, which is clearly fubar, which highlights the necessity for some
handy regex skills. Following a quick google, I found this page:

http://aidanlister.com/repos/?file=function.str_highlight.php

David
--
David Grant
http://www.grant.org.uk/

http://pear.php.net/package/File_Ogg 0.2.1
http://pear.php.net/package/File_XSPF 0.1.0

[Back to original 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

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