Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP Echo HTML From MySQL Value?
#1
so in the mysql it has html

[Image: 3d95368113be4c16e3baa2de95eaab15.png]

so on the index page where im trying to get the HTML it just shows:

[Image: 31b0a5fea66655d7e95be77bc1426bee.png]

PHP Code:
<?php echo htmlentities(getAppSetting('indexeditor')); ?>

is whats on the index page

everything works fine exept it displays as text not as html ?


can anyone help?
Reply
#2
Why are you using htmlentities() function if in the database it's already html?
Superman I am here to rescue you.
This is Support Forums not Support PMs.  Do not PM me for support unless it's private and site related.
Reply
#3
Try adding HTML tags round the HTML code?
Reply
#4
HTML tag won't matter. A browser should render the html anyways.
Superman I am here to rescue you.
This is Support Forums not Support PMs.  Do not PM me for support unless it's private and site related.
Reply
#5
OP got his problem sorted on HF.
Reply
#6
(03-17-2011, 02:41 PM)Cida Wrote: OP got his problem sorted on HF.

What was the issue?

(03-17-2011, 01:58 PM)Omniscient Wrote: HTML tag won't matter. A browser should render the html anyways.

Oh, I wasn't aware of this.
Reply
#7
(03-18-2011, 01:15 PM)★Cooldude★ Wrote: What was the issue?

The usage of htmlentities().
Reply
#8
(03-18-2011, 02:46 PM)Cida Wrote: The usage of htmlentities().

It wasn't needed? I thought that could be the issue but I wasn't sure.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PHP Framework List: An Ultimate Guide to 102 PHP Frameworks for Web Developers tk-hassan 0 943 07-27-2020, 11:26 PM
Last Post: tk-hassan
  PHP echo contents of folder help DAMINK™ 3 1,249 06-01-2012, 04:07 PM
Last Post: DAMINK™
  [NEED HELP] PHP Form post, get, echo Đενɨаηсε™ 5 2,077 02-06-2012, 01:16 PM
Last Post: ★Cooldude★
  PHP Video Tutorials (PHP For Beginners) Eleqtriq 4 3,671 10-10-2011, 01:00 PM
Last Post: Greyersting
  optimize mysql through a php script andrewjs18 7 3,351 10-05-2011, 06:31 PM
Last Post: John.

Forum Jump:


Users browsing this thread: 1 Guest(s)