Posted by Alvaro G. Vicario on 07/11/06 17:03
*** Karl Groves escribió/wrote (Tue, 11 Jul 2006 07:45:11 -0500):
> Just wondering if anyone out there has a good function to highlight code.
> PHP's highlight_string function chokes whenever the string contains certain
> characters. Most of the functions I've found through Googling work with
> files. I'm looking for something that can handle a string.
Maybe it's too big for your purposes, but when I need to highlight code I
use Geshi:
http://qbnz.com/highlighter/
I can't remember whether it can be fed directly with a string but it cannot
you can simply write a child class.
--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Navigation:
[Reply to this message]
|