CapeCoder
CapeCoder

Reputation: 1

How can I get php source code to display neatly on my website?

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?

Upvotes: 0

Views: 454

Answers (5)

Sam Becker
Sam Becker

Reputation: 19636

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.

Upvotes: 1

Corey Ballou
Corey Ballou

Reputation: 43457

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.

Upvotes: 0

mck89
mck89

Reputation: 19241

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

Upvotes: 0

hsz
hsz

Reputation: 152216

SyntaxHighlighter

Upvotes: 0

Amber
Amber

Reputation: 526613

Check out Google Code Prettify.

Upvotes: 0

Related Questions