php
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.
<?php
echo 'Data 1 is here' . PHP_EOL;
echo 'Data 2 is here' . PHP_EOL;
?>
Output
Data 1 is here
Data 2 is here
Was this helpful?
Similar Posts
- Split string by new line PHP
- Create new file and write data to it using PHP
- Send POST request without using curl using PHP 5+
- Convert characters to lowercase using strtolower() function in PHP
- Calculate length of a string using strlen() function in php
- Connect Mysql and PHP using mysqli
- Get last insert id in db using PHP