[PHP] Re: syntax highlighting your php code on a web page
* Steve Turnbull [EMAIL PROTECTED]: Is there a class or some code out there which enables you to print your PHP code to a web page and make it appear with syntax highlighting? As an example of what I am after, have a look here; http://www.phpfreaks.com/phpmanual/page/function.ldap-add.html Please note this is just an example page which highlights what I am after... There's a few ways. highlight_file() and highlight_string() will do it. Another way is to symlink to the .php file as extension .phps -- and provide a link to the .phps file. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Syntax highlighting of odd language
Aaron Gould wrote: Could any of you privide some leads in regard to highlighting syntax of an odd language? I have a large amount of snippits of legacy code from our company's primary application. The code used is BBx (a variant of Basic). I'm attempting to show this code on a web page, but with highlighting of keywords and variables/numbers. I've already got a list of the language's 250-odd keywords in a file. I saw a Text_Highlighter PEAR class, but that seems to only do a bunch of predefined popular languages (ie. SQL, PHP, C). Please don't ruin my Friday afternoon and tell me I'll need to dig into regular expressions. :) regexps are a minimum... What I'd suggest it so find a correctly working parser, which basically feeds your script with the info about what it encounters where. Eg using m4. (gnu.org/software/m4) But that's just my point of view :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Syntax Highlighting
Richard Davey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm after a technique/method that will allow me to syntax highlight source code on my web site. PHP already does a brilliant job of this for PHP code, but I need to extend this to ANY form of source code. Try http://www.beautifier.org/, a free PHP app that can syntax highlight a ridiculously large number of languages ... even Logo! Hope it helps, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php