×

php · level 1 · unit 1 · lesson 3

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

Lines run in order, one after another.

A program can have lots of lines. PHP runs them in order, top to bottom, like ticking off a shopping list. Everything your program shows on the screen is called its .

echo does not start a new line by itself. Leave out the \n and the next echo carries on from the same spot, so your words squash together.

A string with only \n inside, like echo "\n";, makes a blank line. It is handy for spacing things out.

<?php
echo "Ready\n";
echo "Steady\n";
echo "\n";
echo "Go!\n";

End every string you echo with \n and your output stays tidy.