PHP: Get excerpt from the text

The following function will extract the excerpt from the given paragraph text. Following function accepts two arguments.

$text is the text supplied to be excerpted.
$number is the number of words to be returned.

If you have any questions, post below.

I have been developing websites & web applications since 2004 and currently working in London as full-stack Senior Web Developer. I utilize and advocate in the layout, design and coding of websites specifically in PHP format. Experienced in developing applications and solutions for a wide range of corporate, charity and public sector clients and having the enthusiasm and ambition to complete projects to the highest standard. My ulitmate focus is on server side programming, release process, automation, and standards based web site & applications especially on Zend Framework. I also have a keen interest in developing Wordpress plugins and contributing to open source projects.

Leave a Comment

Your e-mail address will not be published. Required fields are marked *