Link to home
Start Free TrialLog in
Avatar of dcj79
dcj79

asked on

displaying text with STRIPTAGS

hello
I'm trying to display text stored in mysql using STRIPTAGS, then all the text is displayed on the same line without returns
is it possible to change this?
thanks
Avatar of WoodyRoundUp
WoodyRoundUp

Yes.
Use this:

assuming your variable name is: $var

$var = strip_tags($var, '<br>');
or if you are using XHTML, use this:
$var = strip_tags($var,'</br>');

sidenote:  proper xhtml breaks as <br/> with an infinite amount of space between the br and /.

just to clarify
upps...
yeah.. sorry.. I mistype...
thanks..
ASKER CERTIFIED SOLUTION
Avatar of Arijit S
Arijit S
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial