RE: [PHP] Weird html - No "real" <cr>
| From: | Brady Mitchell | Date: | Fri, 16 Dec 2005 23:35:49 +0000 |
| Subject: | RE: [PHP] Weird html - No "real" <cr> | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-227565@lists.php.net to get a copy of this message | ||
> Hi
>
> Yes, but I assume that
>
> echo "<hr>Kontroll rad i textfil:$rowsInTextFile av
> $totalRowsInTextFile<br>";
>
> would render a <newline> ?
>
> /G
Echo does not automatically add a newline, you would have to use \n to
get newlines with the echo statement:
echo "<hr>Kontroll rad i textfil:$rowsInTextFile av >
$totalRowsInTextFile<br>";
Will display the line break in the webpage as expected, but to get the
source code displayed to have the line break you would need to use:
echo "<hr>Kontroll rad i textfil:$rowsInTextFile av >
$totalRowsInTextFile<br>\n";
Brady