Jump to content

How do I reverse HTMLENTITIES - eval of HTMLENTITIES string


audiobookie

Recommended Posts

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.

 

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.

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.