This is a source-code-highlighter for HTML. It uses the PEAR package Text_Highligher. It generates valid XHTML-strict code. Currently it can highlight the following languages: C++, CSS, DIFF, DTD, HTML, Java, JavaScript, MySQL, Perl, PHP, Python, Ruby, SQL, XML.You can highligh files, strings or content.
To highlight several code inside a content set a tag <pre lang="?code language?">YOUR CODE</pre> around your code. ?code language? stands for your code-language in which the text should be highlighted. In that case, the select-box does not have effekt.
Important: PHP-code has to start with <?php to be highlighted!
You will need one of my code-css-files to display highlighted code on your website. Two css-files can be downloaded here.
If you want to highlight source-code for your website on the fly, you can use my PHP-Class (class.highlighter.php). You will need a PEAR-Installation including the PEAR package Text_Highligher to get it work. Download my highlighter-class with documentation, css-files and a very simple example.