I'm trying to do something that greymatter does, {{entrymainbodyfirstwords x}}.
where x is the number of words you'd want to display
basically, I was wondering how you'd display the first 10, 20, or 30, etc... words in a string
$words = preg_split('/\s/',$string);
$string = ''; for ($i=0;$i<30;$i++) { if (isset($words[$i])) { //make sure we have something... $string .= $words[$i]; } }
echo $string;