PHP Introduction
PHP is a server side scripting language made for the web. The server runs your PHP code and sends the resulting HTML to the browser, so visitors never see the PHP itself. WordPress, Laravel and a large part of the web run on PHP.
PHP code lives between <?php and ?> tags. A file with the .php extension can mix HTML and PHP.
Example
<?php
echo "Hello, PHP!";Result
Hello, PHP!
- Fragments below are shown without the opening <?php tag. Put <?php at the top of your file to run them.
Exercise
Print text in PHP.
"Hello";Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.