|
|
Len Whistler 08-01-2007, 03:20 AM How do you have PHP sample codes on .php pages that don't process? <code></code> doesn't work. I would like output like this:
<?php
echo "sample";
?>
Without it echoing anything and <?php being displayed.
CFMaBiSmAd 08-01-2007, 03:33 AM You need to use htmlentities() so that things like < > are not interpreted by the browser and are instead treated as literal characters and are displayed.
Len Whistler 08-01-2007, 03:38 AM Thanks CFMaBiSmAd ..... htmlentities() is on page 379 of my PHP book and I will look into it.
rafiki 08-01-2007, 01:51 PM also there is PHP classes out there that will put your code into colour coded output just like it does on these forums i think i seen one on phpclasses.org a while ago.
HTH
Rafiki
show_source(); ? But then thats for an entire page.
rafiki 08-01-2007, 04:13 PM i thought of that but as he mentioned sample code i thought i would direct him in a class...
|
|
|
|
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum
vBulletin® v3.8.2, Copyright ©2000-2013, Jelsoft Enterprises Ltd.