I suppose you could do a _dodgy_ reg.ex. to do your own colour coding
um - ereg_replace("(<[^>]*>)", "<font colour=#00CCCC>\\1</font>", $str);
I haven't tested it, but if you just want to highlight all the tags, then
that should work. If you want to have a different colour for the tag name,
the attributes names, and the attribute values, then you'll have to find
some other way :d

-----Original Message-----
From: John Holmes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 12:27 PM
To: 'Jarrad Kabral'; 'Php-General (E-mail)'
Subject: RE: [PHP] Automatic color coded HTML


Not really. Only settings are in PHP.ini for:

highlight.string        =       #DD0000
highlight.comment       =       #FF8000
highlight.keyword       =       #007700
highlight.bg            =       #FFFFFF
highlight.default       =       #0000BB
highlight.html          =       #000000

That's the defaults. It would be nice if you could break down this just
a little more to apply to HTML tags, strings, etc. 

Search google and sourceforge, maybe something is written already.

---John Holmes...

> -----Original Message-----
> From: Jarrad Kabral [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 05, 2002 10:14 PM
> To: Php-General (E-mail)
> Subject: RE: [PHP] Automatic color coded HTML
> 
> yeah that would be nice....is it configurable at all?
> 
> 
> 
> -----Original Message-----
> From: John Holmes [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 6 June 2002 12:19 PM
> To: 'Martin Towell'; 'Jarrad Kabral'; 'Php-General (E-mail)'
> Subject: RE: [PHP] Automatic color coded HTML
> 
> 
> Actually that only highlights PHP code, not HTML, if I remember right.
> It would be nice if this did highlighting for HTML, too, but I think
it
> just comes out all gray.
> 
> ---John Holmes...
> 
> > -----Original Message-----
> > From: Martin Towell [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 05, 2002 10:00 PM
> > To: 'Jarrad Kabral'; Php-General (E-mail)
> > Subject: RE: [PHP] Automatic color coded HTML
> >
> > highlight_file() or something like that
> >
> > -----Original Message-----
> > From: Jarrad Kabral [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 06, 2002 11:55 AM
> > To: Php-General (E-mail)
> > Subject: [PHP] Automatic color coded HTML
> >
> >
> > Hi All,
> >
> > Is a command in PHP to format source code as color coded HTML?
> >
> >
> >
> > Regards
> > Jarrad
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to