Convert into Mormal text

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
zerandib
Forum Newbie
Posts: 16
Joined: Tue Dec 16, 2008 12:17 am

Convert into Mormal text

Post by zerandib »

Hello

$var = "<td>more info <p>this is sample test</p> example</td>"

This $var is treating as HTML text. (i.e: <td> and <p> as html tags)
How to treat them as normal text. That means <td> as a normal string, without treating as a HTML tag?


Thank You
User avatar
prometheuzz
Forum Regular
Posts: 779
Joined: Fri Apr 04, 2008 5:51 am

Re: Convert into Mormal text

Post by prometheuzz »

I don't see how this is related to regex... But you can wrap <pre> ... </pre> tags around it before displaying it: that way, the actual tags are displayed instead of interpreted as html tags.
Post Reply