In a database, I have the text <b>ISBOLD</b><i>isitalic</i>
How do I do that if I pull out this string, I will see
ISBOLD isitalic
and not
<b>ISBOLD</b><i>isitalic</i>
In a database, I have the text <b>ISBOLD</b><i>isitalic</i>
How do I do that if I pull out this string, I will see
ISBOLD isitalic
and not
<b>ISBOLD</b><i>isitalic</i>
There are a couple of ways:
You basically have to convert the special characters into the entity references.
That means changing <
to <
and >
to >
etc.. In PHP there is a function which does this for you called htmlentities
Wrap that output in an <xmp>
tag.
Option one is probably the better method.