hi i am trying to display php code and html tag in a tuturial, I would like to display it as plain text, how would i do that?

Comments

abdu’s picture

Use the <code> </code> tag to post the php code or html code and display in the post
as I have done below

<?php echo $hai;?>

tchivoan1972’s picture

testing
echo '<li><a href=$val>' . ucwords($key) . '</a></li>';

how come it works on this forum but when i do it on my site the <li> gets display as list instead of just html code.

this is my site http://phpexercise.com/
driveing me nuts why the code tag doesn't work for html tag

gbrands’s picture

You will need to download and enable the CodeFilter module:
http://drupal.org/project/codefilter

celso.goya’s picture

Good module, i'm using the 7.x version without problems!