note 117823 deleted from tutorial.firstpage by googleguy
| From: | googleguy@php.net | Date: | Sat, 15 Aug 2015 20:43:49 +0000 |
| Subject: | note 117823 deleted from tutorial.firstpage by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-203360@lists.php.net to get a copy of this message | ||
Note Submitter: aseefahmed at gmail dot com
----
/n - will not work to display new line in browser. instead, use <br> tag or function nl2br().
example are given bellow:
<?php
echo "this is first line. <br> this is second line";
echo nl2br("this is first line. \n this is second line");
echo nl2br("this is first line" . PHP_EOL . " this is second line");
?>
N.B. : use \n in double quote instead of single quotation mark.