how to select first n words from a string without including html tags in php
<p>i want to get first n words from text stored in my database without cutting words from middle and i don't want to include html tags. Any help ??
eg. if i have </p>

<pre><code>&lt;font size="2" face="georgia"&gt;   &lt;span style="line-height: normal; text-align: justify; "&gt;    &lt;font color="#006600"&gt; Indian Institute of Technology &lt;/font&gt; - Premier Institutes for Engineering in India. &lt;/span&gt;   &lt;/font&gt;
</code></pre>

<p>and i want to get </p>

<p>Indian Institute of Technology - Premier...</p>
