PHP questions, answered with working code.
Search explained answers, or work through a guide from your first script to namespaces.
Popular: password_hash · PDO · sessions · array_map · json_decode
Guides
Introduction to PHP
Syntax, variables, arrays, functions, forms and basic security.
14 sections
IntermediateSessions & Cookies
Keep state between requests: creating cookies, storing and destroying session data.
9 sections
AdvancedNamespaces
Organise larger codebases, avoid name collisions and understand name resolution.
7 sections
From the knowledge base
-
What are the benefits of implementing a collapsible menu feature in PHP for better user experience and navigation?
Implementing a collapsible menu feature in PHP can improve user experience and navigation by allowing users to easily navigate through a website's menu items wi...
Collapsible menu PHP User experience -
What are the best practices for handling character encoding issues when working with CSV files in PHP, especially when dealing with different regional standards like ISO-8859-1 and Windows-1252?
Character encoding issues can arise when working with CSV files in PHP, especially when dealing with different regional standards like ISO-8859-1 and Windows-12...
CSV files character encoding PHP -
How can entries in a table be displayed on a page so that clicking on a specific letter filters the entries accordingly?
To display entries in a table on a page where clicking on a specific letter filters the entries accordingly, you can use PHP to dynamically generate the table b...
PHP MySQL HTML