introduction

Introduction to PHP

Introduction to PHP

PHP is a server-side scripting language used to create dynamic web pages. It can be embedded in HTML and interacts with databases like MySQL.

Basic Syntax

PHP code is written inside the <?php ... ?> tags.

      
        <?php
          echo "Hello, World!";
        ?>
      
    

Activity

Try It Yourself!

Write a simple PHP script that outputs your name.

Quiz

Quick Quiz

  1. What does PHP stand for?
  2. Where do you write PHP code in a webpage?

Answers: PHP: Hypertext Preprocessor; Inside <?php ... ?> tags.