views:

233

answers:

2

I have a CSS parser thats printing out stylesheet to the browser like so:

$cssParser->parse( 'style.css' );
echo '<pre>'; print_r( $cssParser ); echo '</pre>';

Can I 'syntax highlight' the output CSS somehow?

Thanks

+6  A: 

If you want to code-highlight something using PHP, getting some HTML code as output, GeSHi - Generic Syntax Highlighter is a nice solution (used by many software, should I add), that supports lots of languages -- and CSS seems to be one of those.

If you want to try it without integrating it into your application first, there is a demo page available, btw.

Pascal MARTIN
+2  A: 

Hyperlight? (download from svn at http://code.google.com/p/hyperlight/source/browse/trunk/)

http://stackoverflow.com/questions/230270/php-syntax-highlighting?

Stobor
Tried, but there's nothing in the download section.
Nimbuz
didn't notice that. the code is in svn, though...
Stobor
Damn, I really need to produce a release for the project. :-(
Konrad Rudolph