Converting special characters to html

Discussion in 'PHP' started by lv211, Jan 5, 2008.

  1. #1
    I have a script thats outputting some special characters.

    It shows up as &lt;strong class=&quot;keyword&quot;&gt; when it should be showing up as <strong class="keyword">.

    Any ideas on how to fix this?
     
    lv211, Jan 5, 2008 IP
  2. commandos

    commandos Notable Member

    Messages:
    3,648
    Likes Received:
    329
    Best Answers:
    0
    Trophy Points:
    280
    #2
    Try this

    $a = "&lt;strong class=&quot;keyword&quot;&gt;";

    $b = html_entity_decode($a) ;

    echo $b;
     
    commandos, Jan 5, 2008 IP
    lv211 likes this.
  3. lv211

    lv211 Peon

    Messages:
    168
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Fixed.

    Thanks for your help. I gave you some rep.
     
    lv211, Jan 5, 2008 IP