Jump to content


Photo

Examples


  • Please log in to reply
2 replies to this topic

#1 GeorgeMoney

GeorgeMoney
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 24 August 2006 - 11:20 PM

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!
--GeorgeMoney

#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 24 August 2006 - 11:26 PM

GeSHi is often used for this:

http://qbnz.com/highlighter/index.php

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 25 August 2006 - 01:24 PM

You can use highlight_string or highlight_file which will colour your PHP code, just the like forum does here:
<?php

echo "hello world";

?>





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users