Friday, April 28, 2006

Pretty printing PHP for documentation examples

How do I format php and html properly to provide examples in documentation?

Prettyprint of course! How could I forget that?

Here's an online PHP pretty printer that indents html properly also.

It maps plain text file space ("_") to html file space ("&nbsp;") using GNU's Indent and plain text file angle brackets ("<", ">") to html angle brackets ("&lt;", "&gt;").

Here's an example.

0 Comments:

Post a Comment

<< Home