PHP runs on a server. A browser sends a request, PHP reads data and applies rules, then the server returns HTML or a data response.
What you need first
Understand a basic HTML page and form. Begin with variables, conditions, loops, and functions in the starter example before working on requests and databases.
Start with these ideas
A variable such as $name stores a value. An array can store a reading list or map a book ID to its details.
A function accepts inputs and returns a result. Keep a fee calculation separate from displaying a page.
Form input begins as untrusted data. Validation checks its meaning; escaping makes text safe for its output context.
Connect it to a real project
Build a reading list: start with an array of books, add validated forms, save records to a database, then protect each reader’s private entries.
Study one concept at a time. Explain its everyday example in your own words, predict the worked example’s result, then try a small change. Use practice and quiz feedback to decide what to revisit. You can spread a lesson across several study sessions.
Set up your environment Tools, setup steps, and completion requirements
Start with the ideas above, then set up the tools below. Return to the starter example whenever a new term feels unfamiliar.
text
php --version
php -l lesson.php
php lesson.php
# Install Composer separately, then use composer init for your portfolio.
# Run examples locally. Never expose the development server publicly.
A free account saves your progress, notes, exercise evidence and spaced review cards. To complete a lesson, score at least 80% on its quiz, finish both exercises and the project checklist, and submit your project link with a reflection. Project evidence is self-reported; use the final portfolio rubrics to seek an independent code review.
Your PHP learning path
Work through these foundations in order, then bring them together in a project.