user25986
0
Q:

php line break

<?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.");
?>
0


<?php

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

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

New to Communities?

Join the community