It's possible that the keywords wouldn't be in the first X numbers of characters. |---------+------------------------------------------> | | | | | | | | Joseph Crawford| | | <codebowl@xxxxxxxxx>| | | | | | | | | | | | 12/07/2005 02:11 PM| | | | | | | | | | |---------+------------------------------------------> >-----------------------------------------------------------------------------------------------------------------| | | | | | | |To: | | " Mailing List" <php-db@xxxxxxxxxxxxx> | |cc: | | | | | | | | | | | |Subject: | | Re: Google Style Search Results | | | >-----------------------------------------------------------------------------------------------------------------| why not use substr? $preview = substr($string, 0, 50) .'...'; it will probably cut off in the middle of a word, but you can use strpos and check to see if the char is a space to get to the point you want. -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021 codebowl@xxxxxxxxx -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php