html data from mysql through php..

Discussion in 'PHP' started by pattyjay, Jun 13, 2008.

  1. #1
    Hey, i have this data that is stored in a my sql ddatabase, i am retrieving it through ppo / mysql

    <p><span style="color: #0000ff"><span>hello</span></span></p>

    fairly simple, i know..

    how do i get it to actually display in html what it says, like if i echo that string or whatever it just says hello in black and white, where if i were to manually enter that code into a document it would be in blue..

    hellllp i know its simple but...:confused:
     
    pattyjay, Jun 13, 2008 IP
  2. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #2
    hi

    In order to echo it

    Store this in DB

    <p><span style=\"color: #0000ff\"><span>hello</span></span></p>

    Regards

    Alex
     
    kmap, Jun 13, 2008 IP
  3. php-lover

    php-lover Active Member

    Messages:
    261
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    58
    #3
    $str = '<p><span style=\"color: #0000ff\"><span>hello</span></span></p>'; 
    eval("\$str = \"$str\";");
    echo $str;
    PHP:
     
    php-lover, Jun 13, 2008 IP