Home php What does n mean?

What does \ n mean?

Author

Date

Category

There is a code:

& lt;? php
  echo "& lt; table border = '0' cellpadding = '2' cellspacing = '0' width = '100%' & gt; \ n";
  echo "& lt; tr & gt; \ n";
  echo "& lt; td width = '100%' bgcolor = '". $ TitleBackgroundColour. "' & gt; & lt; font face = 'Arial' size = '". $ TitleSize. "' & gt; Error & lt; / font & gt; & lt; / td & gt; \ n ";
  echo "& lt; / tr & gt; \ n";
  echo "& lt; / table & gt; \ n";
  echo "& lt; p & gt; & lt; font face = 'Arial' size = '". $ NormalTextSize. "' & gt;". $ msg. "& lt; / font & gt; \ n";
  echo "& lt; font face = 'Arial' size = '". $ NormalTextSize. "' & gt; & lt; br & gt; Click & lt; A HREF = JavaScript: history.back () & gt; here & lt; / a & gt; to return to the previous page or click the Back button on your browser. & lt; / font & gt; & lt; / p & gt; \ n ";
  echo "& lt; hr & gt; \ n";
? & gt;

Answer 1, authority 100%

This is called the escape sequence / character. Used in programming to denote invisible / control characters.

The list of escape characters is given here


Answer 2, authority 38%


Answer 3, authority 19%

\ n is a sequence of characters signaling the system to make a line break (on unix-like systems).


Answer 4, authority 12%

In this example, the dude just added \ n to each line, apparently not understanding why and, accordingly, it does not make sense.
When outputting to the browser, to break the line, write & lt; br & gt;

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions