$total_lines = count(explode(' ', $content));
Showing 2 lines of 6 total lines in this snippet.
$total_lines = count(explode(' ', $content));
Showing 2 lines of 6 total lines in this snippet.
function textSnippet($string,$length=200){ return preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length+1)); }
Showing 3 lines of 3 total lines in this snippet.
function br2nl($string){ return preg_replace('#<br\s*/?>#i', "\n", $string); }
Showing 3 lines of 3 total lines in this snippet.