The course
PHP
Learn how PHP runs on the server and turns code into web pages. You will work with variables, types, arrays, decisions, functions and loops, then read URLs and forms safely — all while building a small online bookshop.
Ready to learnYour path through the ideas
Inside the course
Install your tools, choose your setup and verify a local run.
02Introduction to PHP4 lessons
PHP is a programming language often used on a web server to process requests and produce responses. See where PHP runs and where it came from, learn its basic writing rules, and understand how variables, scope, types and casting behave.
03Output and Arrays4 lessons
Output sends information to a response or console. A PHP array is an ordered map that can use integer and string keys. Choose between echo, print, var_dump and print_r, then store data in indexed, associative and multi-dimensional arrays.
04Conditionals4 lessons
A conditional selects behavior based on a test, a matching case or whether a value is absent. Choose the right branch with if and elseif, compare one value against many with switch and match, and handle missing values with ?? and ?->.
05Functions5 lessons
A function packages reusable behavior with parameters and a return value. Constants name values that cannot be reassigned. Define constants, write typed functions with parameters and return values, use defaults and named arguments, pass functions as callbacks, and write recursive and variadic functions.
06Loops and Includes3 lessons
A loop repeats instructions. Including a file loads and evaluates that file as part of the current PHP program. Repeat actions with while, do-while and for, walk arrays with foreach, and split a site into shared files with include and require.
07HTTP Methods and Forms3 lessons
HTTP methods describe request semantics. Form and request data arrive as external input that PHP must validate before use. Read query strings with $_GET, handle forms with $_POST using a safe method-validate-act-redirect recipe, and understand $_REQUEST and $_SERVER.