Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
outputting HTML stored in table fields
Old 06-12-2007, 02:30 PM outputting HTML stored in table fields
numbenator's Avatar
Webmaster Talker

Posts: 523
Location: London
Trades: 0
Hi

I have a load of db table fields that store html.

I wish to output them as HTML not text.

echo $row['fieldName'] is outputting the string and not rendering the html.

Any ideas?

Cheers
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
 
Register now for full access!
Old 06-12-2007, 02:38 PM Re: outputting HTML stored in table fields
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Not without more details. You haven't given us much to work with.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 06-12-2007, 02:41 PM Re: outputting HTML stored in table fields
numbenator's Avatar
Webmaster Talker

Posts: 523
Location: London
Trades: 0
errr
I have fields in a db poopulate like below

<p>sdfsdfsdfsdf</p>

when I echo $row['fieldName'] it echo s literaly <p>sdfsdfsdfsdf</p> rather than rendering the p tag or any other html tags defined in the filed.
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
Old 06-12-2007, 02:44 PM Re: outputting HTML stored in table fields
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
It sounds like it's converting them to HTML entities. For example, &lt;p&gt;sdfsdfsdfsd&lt;/p&gt;. Try echo html_entity_decode($row['fieldName']);
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 06-12-2007, 02:46 PM Re: outputting HTML stored in table fields
numbenator's Avatar
Webmaster Talker

Posts: 523
Location: London
Trades: 0
Yup , wicked!
html_entity_decode
Worked a treat. Thanks very much!
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
Old 06-12-2007, 02:47 PM Re: outputting HTML stored in table fields
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Np. TK is appreciated
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Reply     « Reply to outputting HTML stored in table fields
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.29154 seconds with 12 queries