julia18 Posted August 28, 2008 Share Posted August 28, 2008 Hi All, In order to impove the readability of my script, sometime it is necessary to split a long line into multiple lines. For example, the initialisation of a multi-dimensional array. I wonder if anyone of you know how to split a long line into multiple lines please. Thanks! Julia Quote Link to comment Share on other sites More sharing options...
.josh Posted August 28, 2008 Share Posted August 28, 2008 There is no trick to splitting long lines into separate lines. Just put your curser where you want to split and hit the enter/return key. The parser doesn't care about the extra spaces and stuff. Well, usually. It does for certain things, like with heredoc or with outputting headers and stuff. I'm sure you probably indent your code, right? Well it's the same thing... Quote Link to comment Share on other sites More sharing options...
DyslexicDog Posted August 28, 2008 Share Posted August 28, 2008 If you want to split a line just hit enter where you want the split, PHP looks for the semicolon to stop the current line not the line breaks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.