audiobookie Posted December 30, 2007 Share Posted December 30, 2007 I have a data string that is character encoded as follows (this is not the whole string): <TBODY> <TR align=middle> <TH> </TH> <TH><FONT size=-1>6:00</FONT></TH> <TH><FONT size=-1>Max since Midnight</FONT></TH> <TH><FONT size=-1>Min since Midnight</FONT></TH> <TH><FONT size=-1>24 Hour Max</FONT></TH> <TH><FONT size=-1>24 Hour Min</FONT></TH></TR> <TR align=middle> I need to decode the string and have the browser render the html. I tried HTML_ENTITY_DECODE however, that just output the HTML to the screen "<TBODY><TR>" etc. Tried eval() but that didn't seem to work either. Any ideas would be appreciated. Thank you in advance. Link to comment https://forums.phpfreaks.com/topic/83734-how-do-i-reverse-htmlentities-eval-of-htmlentities-string/ Share on other sites More sharing options...
hitman6003 Posted December 30, 2007 Share Posted December 30, 2007 What is the actual code you are using? Link to comment https://forums.phpfreaks.com/topic/83734-how-do-i-reverse-htmlentities-eval-of-htmlentities-string/#findComment-426031 Share on other sites More sharing options...
audiobookie Posted December 30, 2007 Author Share Posted December 30, 2007 The code is echo '<div>'.HTML_ENTITY_DECODE($obj->dataTable).'</div>'; The $obj->dataTable contains the string from the database that is ascii encoded. It is supposed to render as table in the div. Right now it just shows the use the HTML code rather than rendering the table. Link to comment https://forums.phpfreaks.com/topic/83734-how-do-i-reverse-htmlentities-eval-of-htmlentities-string/#findComment-426037 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.