PHP Code Highlight Function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Karl Groves

    PHP Code Highlight Function

    Just wondering if anyone out there has a good function to highlight code.
    PHP's highlight_strin g 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.

    TIA

    --
    Karl Groves

  • Alvaro G. Vicario

    #2
    Re: PHP Code Highlight Function

    *** 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_strin g 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:



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

    Comment

    • Karl Groves

      #3
      Re: PHP Code Highlight Function

      "Alvaro G. Vicario" <webmaster@NOSP AMdemogracia.co mwrote in
      news:uxivo1wusn 6v$.rhigprkhebf n.dlg@40tude.ne t:
      *** 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_strin g 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:
      >

      >
      I can't remember whether it can be fed directly with a string but it
      cannot you can simply write a child class.
      >
      That works perfectly. Thanks!


      --
      Karl Groves

      Comment

      Working...