Re: Google Style Search Results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Joseph and Philip. I think that will work very well.

>> 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.
>>
>> It's possible that the keywords wouldn't be in the  first X numbers of
>> characters.

> Then use strstr() to find the first occurence of the first keyword and
> then use substr with an initial offset...


David

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux