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
<font size="2" face="georgia"> <span style="line-height: normal; text-align: justify; "> <font color="#006600"> Indian Institute of Technology </font> - Premier Institutes for Engineering in India. </span> </font>
and i want to get
Indian Institute of Technology – Premier…
Try this: