View Single Post
Old 01-24-2008, 11:45 PM   #13 (permalink)
wGEric
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
I am going to try to use it for a tutorial, like one of those "type this code" things, so when you go in the browser you can see the php code and the output at the same time.
highlight_file will do what you want. Create a page with your tutorial and then whenever you have source code, create a separate file for the source code. Use that function to put the source code in your tutorial and have a link to see the file run.

If you want this all in the same file then where you want to have the code displayed you'll have to write out the code so it can be displayed. Where you want the results to be displayed, then you write the code so that it is executable and it outputs the results.
__________________
Eric
wGEric is offline  
Reply With Quote
The Following User Says Thank You to wGEric For This Useful Post:
Aaron (01-31-2008)