php newline
snippet in php

new line in php

user8136

<?php
echo "Hello world this is example \r\n in php.";
echo "<br>";
echo nl2br("You will find the \n newlines in this string \r\n on the browser window.");
?>

new line php

user9046

echo "<br>";

php line break

user1353



<?php

echo nl2br("One line.\nAnother line.");

?> 

php new line

user7943

echo "\n";
# it only works in double quotes

php new line

user7297

//let a variable contain multiple line
//add <br> tag in string
$variable = "123 <br> ";