diff options
author | Jeremy Dorn <jeremy@jeremydorn.com> | 2012-05-12 08:59:50 -0700 |
---|---|---|
committer | Jeremy Dorn <jeremy@jeremydorn.com> | 2012-05-12 08:59:50 -0700 |
commit | a90c9d4a49ac2d58d9737aecfeb117c2091abfe0 (patch) | |
tree | 01315938f1252f25ed9a245b6b4659cfe586571d /examples/examples.php | |
parent | 4c6d7f11e8766ba49abf27afbcc0793df50ca7db (diff) | |
download | sql-formatter-a90c9d4a49ac2d58d9737aecfeb117c2091abfe0.zip sql-formatter-a90c9d4a49ac2d58d9737aecfeb117c2091abfe0.tar.gz sql-formatter-a90c9d4a49ac2d58d9737aecfeb117c2091abfe0.tar.bz2 |
Added new method 'highlight' that only does syntax highlighting and
preserves original whitespace.
Diffstat (limited to 'examples/examples.php')
-rw-r--r-- | examples/examples.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/examples.php b/examples/examples.php index df198c3..f8bf524 100644 --- a/examples/examples.php +++ b/examples/examples.php @@ -27,8 +27,15 @@ $statements = array( as temp, DateCreated as Created FROM MyTable;", ); +echo "<h1>Formatting</h1>"; foreach($statements as $sql) { echo "<hr />"; echo SqlFormatter::format($sql); } + +echo "<h1>Syntax Highlighting Only</h1>"; +foreach($statements as $sql) { + echo "<hr />"; + echo SqlFormatter::highlight($sql); +} ?> |