Home / Resources / Coding Fun / PHP for Kids

Let's Play with PHP!

Discover the magic of coding in a fun way!

Let's Start

What is PHP?

PHP is like a magic helper that creates cool things on websites!

A Magic Tool

PHP is a special code that helps make websites do fun things, like showing pictures or playing games.

Works Everywhere

PHP runs on computers that make websites work, so people all over the world can see what you create!

Easy to Learn

PHP uses simple words like "echo" to show things, which makes it perfect for learning to code!

PHP Magic Examples

See what PHP can do with these fun examples!

Say Hello

PHP can say hello! This code tells the computer to show a message:

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

What it shows:

Hello, Friends!

Counting Fun

PHP can count numbers. This code adds two numbers together:

<?php
  $number1 = 5;
  $number2 = 3;
  $total = $number1 + $number2;
  echo "5 + 3 = " . $total;
?>

Let's add numbers:

+ =
8

PHP Fun Quiz

Test what you've learned about PHP with this fun quiz!

1. What does PHP help us do?

2. Which word does PHP use to show messages?

3. What symbol starts a PHP code block?

Learn More About PHP

Check out these resources to become a PHP wizard!