By default, a PHP file is assumed as HTML-file. To run a script, you should put it inside special PHP tags, just like that:
<html> <head> <title>My first PHP website</title> </head> <body> <?php echo 'Hello PHP!'; ?> </body> </html>
In real-life websites you don't really mix HTML and PHP. Instead, you should keep pure PHP scripts and HTML templates separately. However for the learning purposes we will do it from time to time.
So, in the example above your PHP code surronded by PHP tags looks exactly like that:
<?php echo 'Hello PHP!'; ?>
echo is a function that prints a given value. In our case it's
Hello PHP! string. Every PHP statement should end with a semicolon. And that's all we should learn in this lesson.