#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,688
    Rep Power
    171

    Retrieving data from a database


    Hello;

    I am now dealing with a massive database that different resources enter data into it. I don't see the queries that enter data into it. What I have to do is to retrieve the data but I have some issues with HTML characters and...

    For example: 


    There 2 didn't do much:
    PHP Code:
    htmlspecialchars($place['comments']);
    htmlentities($place['comments']); 
    but for some reason this works occasionally:
    PHP Code:
    html_entity_decode($place['comments']); 

    What is the best way to retrieve the data from such database?

    Thank you
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Hi,

    do want to translate HTML entities into the actual characters or the other way round?

    Because htmlentities() and html_entity_decode() are the exact opposite of each other.

IMN logo majestic logo threadwatch logo seochat tools logo