SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Mar 2006
    Posts
    466
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Displaying Literal HTML Code

    I've ran into a situation where I need to display literal html code that I have stored in a MySQL database. I thought this would be simple PHP 101, but I've not ran across a function yet that will do as I need.

    Essentially, I'm looking for the same thing as the code / html feature in vbulletin.

    Any ideas?

    Brandon
    Home Recording Forum -
    Make 60% Commission Pushing my new mega system
    Killer Home Recording

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Code php:
    print htmlspecialchars('<p>This is HTML!!!</p>');

    result:
    Code:
    &lt;p&gt;This is HTML!!!&lt;/p&gt;
    http://www.php.net/manual/en/functio...ecialchars.php
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •