How to echo a line break?
-
I’m sure the fault is mine, but I cannot get my PHP script to output a line-break. Instead it outputs the text of whatever line-break character string I attempt. For example:
[insert_php]
echo ‘line 1’ . ‘\n’ . ‘line 2’;
echo ‘line 1’ . ‘
‘ . ‘line 2’;
[/insert_php]These result in:
‘line 1\nline 2’
‘line 1
line 2′
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to echo a line break?’ is closed to new replies.