Generic Syntax Highlighting For PHP

If you’re looking for an easy way to highlight different types of source code in PHP, there’s a very simple class to help you: GeSHi - Generic Syntax Highlighter. It can display over 50 various coding languages in the appropriate syntax highlighting, with very easy options to manage it.

I’ve used it in various amounts of projects, including my own CodeBase system, for easy publishing of source code. You can find the source code (obviously it’s highlighted ;-) ) right here, on my projects page. It’s also used on the Nucleus Helpdesk pages, where various coding examples are giving for typical coding issues, such as retrieving data from a MS Access database in ASP, sending e-mail via ASP.NET,  or adding a visitor counter to a website in PHP.

It can be used to highlight PHP, ASP, XML, (x)HTML, COBOL, Python, … It ranges from BlitzBasic to VHDL. It’s seriously worth taking a look at their website! And if you’re not convinced, they provide an online tool to test their highlighting.

Spread the word
If you liked the content of this article, please vote for it on the following websites - thanks.
  • Facebook
  • Twitter
  • del.icio.us
  • LinkedIn
  • DZone
  • Reddit
  • Digg
  • StumbleUpon
  • Sphinn
This entry was posted in PHP and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">