It's possible that the keywords wouldn't be in the first X numbers of characters.
|---------+------------------------------------------>
| | |
| | |
| | Joseph Crawford|
| | <[EMAIL PROTECTED]>|
| | |
| | |
| | |
| | 12/07/2005 02:11 PM|
| | |
| | |
| | |
|---------+------------------------------------------>
>-----------------------------------------------------------------------------------------------------------------|
|
|
|
|
|
|
|To:
|
| "[PHP-DB] Mailing List" <[email protected]>
|
|cc:
|
|
|
|
|
|
|
|
|
|
|
|Subject:
|
| Re: [PHP-DB] 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
[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
