Lesson 2 of 307%

(Progress persistence is disabled until Phase 9)

PHP
Beginner

PHP Syntax

Learn about PHP Syntax in PHP.

PHP is a powerful server-side language. In this lesson, we will cover PHP Syntax.

Real code examples

<?php
// PHP code goes between the php tags
$greeting = "Hello, World!";

// Statements must end with a semicolon
echo $greeting;
?>

Common mistakes

Make sure you include the <?php tag when writing PHP!

Try It Yourself

You can experiment with this in the Playground.

Lesson Progress

Take QuizBuild a PHP Project