On Tue, 2007-05-01 at 08:36 -0700, Mattias Thorslund wrote: > Man-wai Chang wrote: > > > > Bash uses only 2. PHP uses 3. And I am using this: > > > > $sql=" > > select ... > > from .... > > left join ... > > on .... > > where ..... > > "; > > > Exactly. I never saw the point in complicating my life with heredocs > when both single- and double-quoted strings can contain multiple lines > anyway. > > One thing that does bother me a little with multi-line strings of either > variety is that if I want to avoid inserting extra spaces in the string > at the beginning of each line after the first, I have to left-align the > whole thing and cannot indent it with the rest of my code: > > if($something){ > if($something_else){ > $myID = intval($_GET['rowID']); > $sql_pretty = > "SELECT > field1, > field2 > FROM > mytable > WHERE > rowID = $myID"; > $sql_ugly = > "SELECT > field1, > field2 > FROM > mytable > WHERE > rowID = $myID"; > } > } > > Are there perhaps editors that would DISPLAY multi-line quoted strings > "indented" to the correct level without inserting extra spaces? Some > editors wrap lines to the correct level, which is also much more > readable, so what I'm thinking of is a bit similar to that. Then you'd have an editor that presents something other than what is actually there. Go see Microsoft, I'm sure they create rubbish like that. Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php