.. _fsnippetbywordcount: ######################################################################################## ``snippet_by_word_count`` — Return a substring of the text by limiting the word count. ######################################################################################## :doc:`Text-related functions ` ******* Summary ******* .. include:: /Reference/libraries/globals/summary/snippet_by_word_count.rst .. php:function:: snippet_by_word_count($text, $maxWords = 20, $ellipsis = '...') Return a substring of the text by limiting the word count. Note: it strips the HTML tags from the text before getting the snippet :type $text: string :param $text: :type $maxWords: int :param $maxWords: :type $ellipsis: string :param $ellipsis: :returns: string ***** Usage ***** .. include:: /Reference/libraries/globals/usage/snippet_by_word_count.rst ******** Examples ******** .. include:: /Reference/libraries/globals/examples/snippet_by_word_count.rst ******** See Also ******** .. include:: /Reference/libraries/globals/see_also/snippet_by_word_count.rst