<?php $summary = <<< summary line 1 line 2 <a href="http://www.php.net">PHP 5</a> summary; $words = sizeof(explode(' ',strip_tags($summary))); echo "Total words in summary: $words"; ?>