Skip to content
Learn to work with AI coding agents. Try a free lesson

Learn at your own pace

Learn to code.
One card at a time.

Short, interactive lessons with clear examples and practice exercises. Learn to work with AI coding agents, or learn PHP.

  • Connect your AI agent to Kodivo
  • Based on official docs

Sample PHP lesson

Meet Kodi

Your learning companion.

Lesson preview

Your first output

Write your first message

This PHP program writes a message. echo sends the text between the quotes to the output; the syntax itself is not printed.

PHP
<?php

echo 'Hello, PHP!';

Output

Hello, PHP!

Try it now

What does this program write?

<?php
echo 'Hello, PHP!';
Choose an answer

Read the syntax

Start with <?php followed by a line break. Then read the echo statement as three parts:

PHP
<?php

echo 'Hello, PHP!';
  • echo is the instruction that writes the text.
  • Single quotes enclose a string: a piece of text.
  • The semicolon finishes this statement.

Put it into practice

Complete the instruction and its statement terminator.

<?php
 'Welcome!'
Choose a block for the active gap

Change the message

Change the text inside the quotes to choose a different message. Keep the surrounding syntax. echo does not add a line break of its own.

PHP
<?php

echo 'Welcome back!';

Output

Welcome back!

Check your understanding

Recall the output keyword introduced in this lesson. Complete the statement so the program writes Go!.

<?php
____ 'Go!';

Sources and notes

PHP tags

How the opening tag marks the beginning of PHP code.

Writing output with echo

How echo sends text to the output, without adding a newline.

Single-quoted strings

How quotes enclose text and which characters need escaping.

Separating instructions

How a semicolon marks the end of a PHP statement.

Credits and license

PHP Documentation Group. CC BY 3.0 or later.

Adapted explanations based on the cited PHP manual sections. Lesson wording, examples, and illustration were prepared for this project with AI assistance. This is not an official PHP course.

Use the arrow buttons or left/right keys

Choose a path.
Build on what you learn.

Work with AI coding agents, or learn PHP, the language behind Laravel and Livewire.

Learn card by card

Documentation,
made approachable.

Read a short explanation, see the code and its output, then swipe or click to the next card. Follow the source links for more detail.

Explore the basics

PHP and Coding with AI

Understand code
and work with AI.

Explore PHP through code and output, or practice giving an AI agent a clear task and checking its work.

Know when AI is adding too much.

Learning the basics helps you explain what you want and check the code you get back. You can spot unnecessary boilerplate and ask for a simpler solution.

Why the basics still matter

Every lesson is free.

All published chapters and technologies, with your progress saved. No subscription or payment card.

Learn for free

$0

  • Every published chapter and lesson
  • All available technologies
  • Your learning progress saved
  • Code examples and practice exercises

Help keep Kodivo free

Voluntary contributions and sponsorships help fund hosting, new lessons and the development of Kodivo.

Support is optional. Everyone gets the same access to learning.

Sponsor Kodivo

Help more people
learn to code.

Support the development of more programming lessons. PHP and AI Coding are available now. Laravel and Livewire are planned.

For voluntary support or sponsorship, get in touch.

[email protected]

A place for your brand.

As a sponsor, your company can be featured in a dedicated sponsors section on our homepage, with your logo and a link to your website. Sponsorship never changes access to lessons.

Your first lesson

Start with
your first lesson.

Pick AI Coding or PHP. Each lesson is a few short cards with an example, followed by one question.

Create an account

Learn PHP or direct coding agents.
Laravel and Livewire will follow.