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.

 

Link to comment
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.