Truncate text preserving keywords


/ Published in: PHP
Save to your folder(s)

This function truncates text preserving the keyords specified, usefull for search results that should highlight found words.

URL: http://www.barattalo.it/2009/11/24/truncate-string-preserving-some-words-in-php/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.