views:

86

answers:

5

Hi, is there some Javascript/CSS snippet or perhaps another solution to parse PHP source code intended as content on a web page so that it has highlighted elements for commands, variables, brackets etc?

A: 

Check out Google Code Prettify.

Amber
A: 

SyntaxHighlighter

hsz
A: 

i don't know if i've understood well your question bu if you want a syntax highlight on a php function use the highlight_file function

mck89
A: 

Github's GISTs can be made public and included directly in your pages. I really wish they'd add tabbing to the editor window, however.

cballou
+1  A: 

PHP has a built in feature that allows you to rename your PHP files to ".phps", this stands for "PHP Source" or something. This will display nicely formatted PHP code for you.

Sam152