NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP function to execute HTML tags

Lester Leong lester.bleong at gmail.com
Tue Apr 3 21:07:17 EDT 2012


Double-check how the markup is being saved to the database. You might be
inadvertently applying htmlentities or other processing to escape / remove
special chars.

On Tue, Apr 3, 2012 at 6:55 PM, Ron Guerin <ron at vnetworx.net> wrote:

> On 04/03/2012 05:44 PM, tuon1 at netzero.net wrote:
> > Hi!
> >
> > Can you guys tell me what the PHP function that executes HTML tags when
> > the content from the database contains HTML tags get dumped onto the
> > webpage?
> >
> > I used to know it but since I haven't used it for a long time, I can't
> > think of its name right now.
> >
> > What I am talking about is that when HTML tags got stored in the
> > database, it gets treated like ordinary plain texts and when those plain
> > texts get dumped onto the webpage, the browser treats or displays them
> > as texts.
>
> I'm not entirely sure I understand the question.
>
> You can echo HTML retrieved from the database to execute HTML markup.
>
> To see the markup as text, you can echo it after running it through
> htmlentities().
>
> http://us3.php.net/manual/en/function.htmlentities.php
>
> - Ron
>
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show-participation
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20120403/901e7970/attachment.html>


More information about the talk mailing list