"
"
if "test
" not return, new line
1st solution:echo "test".PHP_EOL;
2nd solution:<?php header('Content-type: text/plain'); ?>
3rd solution:"<br />" instead of "
" or "
"
<?php
echo nl2br("If you want that '
' works.
Then use nl2br() function!");
echo "<br> can also be used.";
echo "nl2br() is in-built function whereas <br> is html tag";
?>
‘
’ or ‘
’ is the easiest way to embed newlines in a PHP string
// When you run a PHP script in a browser, it will be rendered as HTML by default.
// Use <br /> instead or modify the header to content type plain text
echo "Hello <br /> World";