GeorgeMoney Posted August 24, 2006 Share Posted August 24, 2006 How do you make those "examples" like you see in many php things, like the comments are orange and strings are red and variables are blue and commands are green?Is there a predefined function to do this? or do you have to use a script? if so can someone show me?Sorry if this sounds a little stupid.Thanks in advance! Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted August 24, 2006 Share Posted August 24, 2006 GeSHi is often used for this:http://qbnz.com/highlighter/index.php Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted August 25, 2006 Share Posted August 25, 2006 You can use highlight_string or highlight_file which will colour your PHP code, just the like forum does here:[code=php:0]<?phpecho "hello world";?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.