how to truncate a whole word?
<blockquote>
  <p><strong>Possible Duplicates:</strong><br>
  <a href="http://stackoverflow.com/questions/2154220/truncate-a-multibyte-string-to-n-chars">Truncate a multibyte String to n chars</a><br>
  <a href="http://stackoverflow.com/questions/79960/how-to-truncate-a-string-in-php-to-the-word-closest-to-a-certain-number-of-charac">How to Truncate a string in PHP to the word closest to a certain number of characters?</a>  </p>
</blockquote>



<p>eg:</p>

<blockquote>
  <p>PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, </p>
</blockquote>

<p>Only  a portion of it should be displayed.</p>

<p>I have used the <code>substr()</code> function, but the result may be <code>PHP is a widely-used general-purp</code>. How can the output be truncated to a whole word, not part of one?</p>
