Line break weirdness in PHP templating

Nikel

New Member
I've been dealing with this for years but it's so nit-picky that I never looked into it. But I have always wondered.In a PHP template, if I run this:\[code\]<p><?php echo 'Between "?>" and "</p>" is one linebreak.'; ?></p><p><?php echo 'Between "?>" and "</p>" is one space, then one linebreak.'; ?> </p><p><?php echo 'Between "?>" and "</p>" is two linebreaks.'; ?></p>\[/code\]This is the output:\[code\]<p>Between "?>" and "</p>" is one linebreak.</p><p>Between "?>" and "</p>" is one space, then one linebreak. </p><p>Between "?>" and "</p>" is two linebreaks.</p>\[/code\]I don't understand this behavior. Why is it ignoring a single line break as if it's not there (like in the first example)?
 
Back
Top