bholls Posted March 12, 2008 Share Posted March 12, 2008 Hi all, Hoping this one's going to be simple. Is there a php function that I can apply to a string to take just a 'snippet' from it? What I'm trying to achieve is to display search results with an excerpt from each item's main content text. Many thanks, bholls Link to comment https://forums.phpfreaks.com/topic/95786-snippet-of-a-string/ Share on other sites More sharing options...
dooper3 Posted March 12, 2008 Share Posted March 12, 2008 look up substr() on php.net, that should help you. Link to comment https://forums.phpfreaks.com/topic/95786-snippet-of-a-string/#findComment-490354 Share on other sites More sharing options...
bholls Posted March 12, 2008 Author Share Posted March 12, 2008 the one string function I didn't look at... Many thanks! Link to comment https://forums.phpfreaks.com/topic/95786-snippet-of-a-string/#findComment-490355 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.