$var = \"Hi there\".\"
\".\"Welcome to my website\".\"
;\"
echo $var;
Is there an elegant way to handle line-breaks in PHP? I\'
Not very "elegant" and kinda a waste, but if you really care what the code looks like you could make your own fancy flag and then do a str_replace.
Example:
$myoutput = "After this sentence there is a line break..|.. Here is a new line.";
$myoutput = str_replace(".|..","<br />",$myoutput);
or
how about:
$myoutput = "After this sentence there is a line break.E(*)3 Here is a new line.";
$myoutput = str_replace("E(*)3","<br />",$myoutput);
I call the first method "middle finger style" and the second "goatse style".