Add Topic


waiting answer July 28, 2021

How to create a new line in PHP

June 13, 2021

The PHP provides an in-built function that is used to insert HTML line breaks before all newlines in the string. You can also use \r\n or \n to create a new line inside the source code.

        echo "Welcome to America \r\n Nice to meet you.";
        echo "<br>";
        echo nl2br("Welcome to England \n The place is beautiful \r\n and excellent");


        Welcome to America 
        Nice to meet you.
        Welcome to England 
        The place is beautiful
        and excellent

0 0

Please Login to Post the answer

Leave an Answer