The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Display HTML code with PHP

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #37593

    As you probably all know, we can display code here in <pre><code></pre></code> tags.
    But how can we do that on our own pages without using <xmp> (outdated) ?

    I guess it can be done with htmlentities(), but how can I make the <code> tag always have text within it run through htmlentities() first so as to display the tags?


    The code would seem to suggest that, but when I was looking for this on the internet (how to display the code) I heard about prettify only making the text a different colour and not showing the code (unless escaped).
    I’ll give it a try.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.