Search code snippets, questions, articles...

Print or echo new line using PHP

We can use PHP_EOL to print or echo a new line in PHP. We can also use \n or \r\n to echo the new line in PHP.
    echo 'Data 1 is here' . PHP_EOL;
    echo 'Data 2 is here' . PHP_EOL;
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool


Data 1 is here
Data 2 is here
Was this helpful?