+ 4

what is new line??

It is written in an example "John/n" and "/n" is used for new line. what is a new lina ?

18th Sep 2016, 12:22 PM
Archit Sharma
Archit Sharma - avatar
11 Answers
+ 5
The output of "John. This is new line." is John. This is new line //output will be printed only in a line The output of "John.\nThis is new line" is John. This is new line. //output will be printed only in two line //The words after \n will jump to next line...
19th Sep 2016, 9:04 PM
Hein Htut Aung
+ 4
"\n" is an escape sequence in object oriented languages that is used to move the cursor to a new line while printing. In its least form.."\n"-new line, is just like using the "enter" key on your computer while typing. Each time u click on "enter" the cursor goes down to a new line and whatever you type then appears on this new line. there "\n" does exaclty the same thing.
14th Nov 2016, 10:54 AM
Maduekwe Ebuka Collins
Maduekwe Ebuka Collins - avatar
+ 3
use br in html
18th Sep 2016, 4:58 PM
Nishan
Nishan - avatar
+ 3
echo '<br/>';
20th Sep 2016, 2:12 PM
Bienvenu Ange Niansou KOFFI (NiansDev)
Bienvenu Ange Niansou KOFFI (NiansDev) - avatar
+ 2
( \n) mean that, the next input will putted in new line.
27th Sep 2016, 10:29 PM
Ahmed
Ahmed - avatar
+ 1
newline is nothing but going to next line
11th Oct 2016, 3:32 AM
prashanth
prashanth - avatar
+ 1
\n on linux \r on OSx \r\n on Windows
17th Nov 2016, 9:19 AM
Moritz Poldrack
Moritz Poldrack - avatar
+ 1
It Means that Cursor Will Move To Next Line
13th Jan 2017, 6:05 AM
Harsh
Harsh - avatar
+ 1
suppose the sentence is written in a line i between them we have to cut the line and create new line so we can use \n to create a new line.
13th Jan 2017, 6:00 PM
Varsha Shrivastwa
Varsha Shrivastwa - avatar
0
i am not asking for its substitute in html
18th Sep 2016, 5:02 PM
Archit Sharma
Archit Sharma - avatar
0
whats its purpose
18th Sep 2016, 5:02 PM
Archit Sharma
Archit Sharma - avatar