SqlFormatter
Lightweight php class for formatting sql statements
A lightweight php class for formatting sql statements. It can automatically indent and add line breaks in addition to syntax highlighting. I found myself having to debug auto-generated SQL statements all the time and wanted some way to easily output formatted HTML without having to include a huge library or copy and paste into online formatters. I was originally planning to extract the formatting code from PhpMyAdmin, but that was 10,000+ lines of code and used global variables...