Display php code on webpage without executing?

I decided to actually learn PHP I’m just doing some tutorials I found on YouTube.

So say I wanted to show some php code on my webpage without executing it.

Is there HTML tags I can put the PHP in to display the code. Or do I do it with PHP script.

And which way works best?

And just is there an HTML tag that is equivalent to the BB code?

PHP Code:


     <?php

$num 1;

while ($num<=10)

{

echo 
"Loop $num <br />";

$num $num 1;

}

?>


This seems like a really stupid thing to not know.

View full post on Tycoon Talk

, , , ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Get Adobe Flash playerPlugin by wpburn.com wordpress themes


RSS Site FeedRSS Site Feed

© 1992-2011 DC2NET™, Inc. All Rights Reserved