I was trying to add a line break for a sentence, and I added /n
in following code.
echo "Thanks for your email. /n Your orders details are below:".PHP_EOL;
echo 'Thanks for your email. /n Your orders details are below:'.PHP_EOL;
For some reasons, the I got server error as the result. How do I fix it?
This question is related to
php
The new line character is \n
, like so:
echo __("Thanks for your email.\n<br />\n<br />Your order's details are below:", 'jigoshop');
You have to use br when using echo , like this :
echo "Thanks for your email" ."<br>". "Your orders details are below:"
and it will work properly
You may want to try \r\n for carriage return / line feed
Source: Stackoverflow.com