ScopeTreasure Courses

PHP Notes in Simple English — Code Scope

Free PHP notes for beginners: what PHP is and how to set it up, syntax and variables, data types and operators, if-else and switch decisions, loops, functions, arrays, strings, forms and superglobals, sessions and cookies, file handling, MySQL connection and OOP basics — and a final guestbook project that ties it all together. Runnable code examples with real output, common mistakes and practice tasks in every lesson. From the Code Scope PHP series.

12 lessons — Code Scope series PH.1–PH.12 Read online — free PDF download for every lesson Code you can copy & run

PHP Courses

12 LESSONS · CODE SCOPE SERIES PH.1–PH.12

PHP from zero: your first page on XAMPP, variables, data types, decisions, loops, functions, arrays, strings, forms, sessions and files, MySQL and objects — and a final guestbook project that ties it all together.

Lesson PH.1

What Is PHP? + Setup

PHP is the language that runs on the server and builds the page before the browser ever sees it — learn what it is, why Laravel needs it, and run your first page with XAMPP.

Read the notes Video
Lesson PH.2

Syntax and Variables

Every PHP line starts with <?php and every variable starts with $ — learn the tags, echo, comments, and how to mix PHP into HTML.

Read the notes Video
Lesson PH.3

Data Types and Operators

Text, whole numbers, decimals and true/false — learn the four main types, how to check a type, and why . joins text while + adds numbers.

Read the notes Video
Lesson PH.4

Conditionals: if, else and switch

Programs make decisions with if, elseif and else — learn comparisons, the difference between = and == and ===, and switch for many fixed choices.

Read the notes Video
Lesson PH.5

Loops: for, while and foreach

Loops repeat work without rewriting it — learn for loops, while loops, foreach over arrays, break and continue, and how to avoid infinite loops.

Read the notes Video
Lesson PH.6

Functions

A function is a named block of code you can run again and again — learn function, parameters, return values, and why a variable inside stays inside.

Read the notes Video
Lesson PH.7

Arrays

An array holds many values under one name — learn numbered arrays, key => value arrays, nested arrays, count, and reading them with foreach.

Read the notes Video
Lesson PH.8

Strings

A string is text inside quotes — learn single vs double quotes, variables inside strings, length, searching, replacing, and splitting text.

Read the notes Video
Lesson PH.9

Forms and Superglobals

A form sends data to the server — learn $_GET and $_POST, the difference between the two methods, $_REQUEST and $_SERVER, and checking input safely.

Read the notes Video
Lesson PH.10

Sessions, Cookies and Files

The server can remember you — learn sessions that live on the server, cookies that live in the browser, and reading and writing files on disk.

Read the notes Video
Lesson PH.11

MySQL and OOP Basics

Real apps keep data in a database — learn connecting with mysqli, SELECT and INSERT, the prepared-statement shield, and classes and objects in one lesson.

Read the notes Video
Lesson PH.12

Final Project: Guestbook App

The whole series in one small app — a form, validation, saving to MySQL, a list page, and a flash message — built step by step and tested live.

Read the notes Video