Return to Snippet

Revision: 8435
at September 21, 2008 09:21 by gfazioli


Initial Code
/**
 * String word cut
 *
 * @private
 */
function _wpmutility_wordCut($content, $limit){
	$content = explode(' ',$content);
	for($i=0; $i<$limit; $i++) $summary[$i] = $content[$i];
	$summary = implode(' ', $summary).'...';
	return $summary;
}

Initial URL
http://www.undolog.com/2008/09/21/very-short-snippet-php-word-cut/

Initial Description
Word Cut Function

Initial Title
Very short snippet: PHP word cut

Initial Tags
php

Initial Language
PHP