Search⌘ K
AI Features

"Hello World" Explained

Explore the fundamentals of writing your first PHP script by understanding the PHP opening and closing tags, the echo statement for output, and proper use of semicolons. This lesson lays the groundwork for coding PHP by explaining how PHP processes and displays data on the screen.

Here’s the code from the previous lesson:

PHP
<?php
echo "Hello, World!\n";
?>

Let’s take a look at this in detail.

We’ll start from the very first line and go step by step!

PHP Opening Tag

A PHP script can be written anywhere in the document, and it signifies the start of the PHP code.

echo

PHP ...