I am not sure if this is an Ubuntu, Apache or PHP issue.
The following basic scripts do not render a new line in my Firefox browser.
echo "this is not \n creating a new line";
echo "this is not \r\n creating a new line";
echo "this is not creating a new line";
I am currently learning PHP and have no idea where to even start solving this. All I know from Googling is that the above 3 should work.
echo "this does <br> create a new line";
Ubuntu 18.04.2 Apache/ 2.4.29 (ubuntu) PHP 7.3.7-2+ubuntu18.04.1 Fireforx Developer (Quantum) 68.0.1 (64bit)
Thank you @cmak.fr and @Mathieu for your answers. It makes better sense now. I also found this link after reading you reply https://www.webmasterworld.com/php/3127164.htm.
Snooping bit further I found that the
<pre> tag also works when combined with
\n. Why is that?
<html> <body> <h1>Some h1</h1> <p>Some text</p> <pre> <?php echo "this is not \n creating a new line";?> </pre> </body> </html>