|
Posted by chris.huh on 01/22/07 11:58
J.O. Aho wrote:
> chris.huh wrote:
>
> > So with ereg* you specify what things it should search for in a
> > variable and then it removes them leaving just what is left in another
> > variable. Then i apply the 'select first 100 characters; function to
> > that. Is that right?
>
> Seemed it was even easier than using ereg*
>
> $stringnotags=substr(strip_tags($stringwithhtml),0,100);
>
>
> http://www.php.net/strip_tags
> http://www.php.net/manual/en/function.substr.php
>
> --
>
> //Aho
Ah brilliant - exactly what i needed, and one small line. Perfect,
thanks Aho.
Navigation:
[Reply to this message]
|