CodeIgniter Forums
displaying code markup in the browser - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: displaying code markup in the browser (/showthread.php?tid=28460)



displaying code markup in the browser - El Forum - 03-11-2010

[eluser]elaniobro[/eluser]
I looked over the forum, maybe I was using the wrong words, but have not found an answer.

How can I display code in a browswer? Similar to how we post code here in the forums, how do you do such?

I have tried using the <code> tag but that has not worked... ideas?


displaying code markup in the browser - El Forum - 03-11-2010

[eluser]elaniobro[/eluser]
Only way to do it is like such:
*note: html entities get translated, so put a '/' in

Code:
&/lt;a&/gt; &/lt;img src="" /&/gt;aselfaslkfas    &/lt;/a&/gt;

Doing this:
Code:
<code>
    <a><img src="" />as;lfaslkfas    </a>
</code>

produces this:
as;lfaslkfas <--just the text even the the code is shown in the source...