beta

Register or sign in with facebook

Tags » PHP » Question 1 of 1

Question:

Why will the following text all be on the same line?

echo 'here is the first line\nhere is the second line';
  • \n is not the escape character for a new line

  • the text is in single quotes as opposed to double quotes

  • the \n character should not be inside a string, but concatenated with one such as:

    echo 'here is the first line'.\n.'here is the second line';

Added by ricick : 16th September

0

You have answered every question we have on PHP.

Take a related quiz...

...or add a question to Quizmash

If you want to contribute to Quizmash, you can add a question of your own about PHP, or indeed any other subject you can think of.

Step 1: Write your question

Struggling to think of a question? Why not see what wikipedia has to say about PHP for ideas.
If you're having trouble coming up with alternate answers, try making it a simple true or false question.

Step 2: Add the answers, and mark one as correct

You can add or remove answers as needed.

Step 3: Add some tags

Add some tags that describe your question. Seperate them with commas or the enter key

You can click on these recommended tags to quickly add them

    Step 4: Add the source (optional)

    If you want you can add a reference url for this question.

    Step 5: Are you human?

    If you want to you can log in with facebook , or register with us.
    Don't worry, we'll remember the question you're entering above for you.
    That way you can keep track of any questions you enter, and you don't have to do this step every time.

    Well done.

    You got that question right

    Added by ricick : 16th September

    0

    This quiz

    You have 0 out of 0 questions correct.

    Why not add a question of your own about PHP?