If this layout is exactly as in your code then that is exactly what will happen.
PHP is adding the newline/carriage returns and the tabs/spaces of your code to your $body variable.
PHP thinks that everything upto the ';' is part of the line of code.
If you want to write your code like this for clarity, then make each line a
php line in its own right and build your $body content as you go. See example code:
- Code: Select all
$body = 'first line of code';
$body .= 'second line of code';
...
and so on.