\t represents a tab
\n represents a new line
\r represents a carriage return
Hope that clears it up for you!
0 Replies
vijaywebsolutions
0
Tue 28 Oct, 2014 01:59 am
@roverroad,
\n is the newline character, \t is the tab character. It's usually use for formatting html. eg,
echo "<html>\n<head>\n</head>\n<body>\n\t<div>\n\t</div>\n</body>\n</html>";
While using this \n, it means what ever you wrote it will show on the next line though it means next line.
0 Replies
icajobguarantee
0
Sat 28 Feb, 2015 06:53 am
@roverroad,
It means new line break
0 Replies
hingehead
4
Sun 1 Mar, 2015 03:23 pm
Two pages of people answering a question answered 9 years ago and not one appears to have thought to read a previous answer. An awesome slow experiment in clueness. I'm leaving this thread to someone in my will.
0 Replies
MarinWhite
0
Tue 10 Mar, 2015 01:35 am
@roverroad,
Hi,
Though the code is working fine but \n is used internally by the compiler to point the new line.
0 Replies
jamegriffin
-1
Sat 10 Oct, 2015 12:44 am
@roverroad,
\n is the newline character, \t is the tab character. It's usually use for formatting html. eg,
\n ,It is used for newline.
For this example I have considered two string named x and y, then assigned value and prinedt it.
$x = 'Hi';
$y = 'Bye';
echo '<p>' . $x . '</p>\n';
echo '<p>' . $y . '</p>';
Output:
Hi
Bye