Statements

Statement is an instruction for a computer. PHP code is a set of statements separated by ;.

Here is an example of code with two statements. When you run this code you will see two sentences on the screen, one after the other.

<?php

print_r('Mother of Dragons');
print_r('Dracarys!');

Actually, it’s possible to put a few statements in one line:

<?php

print_r('Mother of Dragons'); print_r('Drakarys!');

but it’s considered a bad practice.

instructions

Put these three names on the screen, one after the other: “Robert”, “Stannis”, “Renly”.


definitions
  • Statement — an instruction for a computer. PHP code is a set of statements separated by ;


Exercise available only for signed users.

Please sign in with your GitHub account, this is necessary to track the progress of the lessons. If you do not have an account yet, now is the time to create an account on Github.