On 06/07/11 17:33, Robert Williams wrote:
Where I've made most use of heredocs is when I want to do nothing but define a bunch of long strings in one file.
I find the most useful thing about heredocs is that they don't care about quotation marks, so I often use them for SQL statements where I might have a mixture of ' and "
eg. $sql =<<<EoSQL SELECT foo AS "Foo" FROM Bar WHERE baz='quux' EoSQL; -- Peter Ford, Developer phone: 01580 893333 fax: 01580 893399 Justcroft International Ltd. www.justcroft.com Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kingdom Registered in England and Wales: 2297906 Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php