View Full Version : Line Breaks in Code
gawing
08-27-2002, 04:11 PM
This is probably a very simple question for most of you, but here it is...
Does PHP have a way to carry code over to another line with an underscore ( _ ) or similar character like other programming langauages do? If so, please provide a basic example.
Thanks.
mordred
08-27-2002, 04:53 PM
I'm not sure I understand your question. What exactly do you mean with "carrying code over to another line"? If you mean how string data can pass several lines, here is an example:
$str = "Here it goes on the first
and here on the second
and on the third line";
echo $str;
This will print out three lines of text. If that's not what you're looking for, please be more specific, perhaps even include a pseudo-code example how you would implement a "carrying over" in this other programming language (just for illustration purposes).
gawing
08-27-2002, 05:25 PM
Thanks for your example. I thought that each line had to end with a semi-colon. I didn't realize that you could have line breaks in the code before a semi-colon.
You've answered my questions.
Thanks.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.