
Discover PHP, a free open-source web scripting language, for fast, stable server-side processing across Linux, Windows, and Mac, with Apache and MySQL integration.
Set up a local development environment with WAMP or MAMP to test PHP scripts, store them in the web root, and organize projects in dedicated folders like P2P lessons.
Create a basic PHP file that outputs hello world with echo, verify local web server, and save the file as intro.php in the lessons folder to view at localhost/php/lessons/intro.php.
Learn the basics of PHP syntax, including embedding PHP in documents, echo outputs, comments, arithmetic, and the difference between case sensitivity for variables versus language constructs.
Learn how PHP variables act as containers for numeric and text data, declared with a dollar sign and output with echo, including simple arithmetic with x and y.
Learn how PHP handles variable scope by contrasting global and local variables, demonstrating access rules inside and outside functions, and common undefined variable errors.
Learn how the global keyword accesses global variables inside a function, using x=30 and y=20 to set y as x plus y, yielding 50 via the $GLOBALS array.
Learn how the static keyword in PHP lets a local variable retain its value across function calls, initialized to 10 and incrementing to 11, 12, and 13 with each execution.
Learn PHP's output methods by comparing echo and print; echo supports multiple parameters and runs slightly faster, while print does not.
Explore PHP data types such as string, integer, float, array, null, and boolean. Learn to declare variables with quotes and view their types using echo and var_dump.
Explore php objects by defining a class with properties and methods, using public access, creating instances, and calling a hello method to output person details.
Explore essential PHP string functions, including word count, reversing strings, locating text with string position, and replacing words with string replace, using practical examples like hello world.
Learn how PHP constants provide unchangeable, global values, declared with a name starting with a letter or underscore, optionally case insensitive, and accessed inside functions via echo.
Explore PHP operators, including arithmetic, assignment, comparison, increment/decrement, logical, string, and array operators, with practical examples and outputs.
Explore PHP conditional statements, including if, else, else if, and switch, and learn how to control output based on variable values.
Learn how to implement PHP else-if chains to map a 0-100 test score to letter grades using conditions with if, else if, and else statements to output F through A+.
Learn how the PHP switch statement compares an expression to cases and executes the matching block, outputting you drive a Volvo, you drive a BMW, or you don’t drive.
Learn PHP loops, including while and do while loops, with incrementing x and conditions like x is less than 10, and observe output via echo.
Learn PHP loops by using the for loop to iterate from zero to ten and foreach to traverse a cars array, outputting values with echo.
Define and call PHP functions, including custom ones, using function name() { ... }, with arguments passed in parentheses and echo outputs to display values.
Define PHP functions with default parameters and arguments, using a my age example with default value 30, and use the return statement to sum x and y and output results.
Explore PHP arrays, including indexed, associative, and multi-dimensional types, using colors and scores examples, zero-based indexing, count for length, and for and foreach loops to output values.
Explore creating and accessing multi-dimensional arrays in PHP by organizing students and two test scores into an array of arrays, using indices to output each student's grades.
Learn PHP sorting arrays with sort and rsort for values. Use asort, arsort, ksort, and krsort to sort by value or key in ascending or descending order.
Discover PHP superglobals, built-in variables always accessible, and how a global variable can be used outside a function; see how server name and script locations are retrieved with $_SERVER.
Learn PHP form processing with the action attribute, server-side validation, and data transmitted as key-value arrays via GET and POST methods.
Explore PHP post and get basics by submitting a form with f_name and email to a script; get exposes data in the URL, making it insecure for sensitive information.
Build a PHP form that outputs user input on the same page, uses post method, and validates data with trim, stripslashes, and htmlspecialchars for security.
Learn to enforce required fields in a PHP form by validating name and website on submit, displaying red error messages, and outputting data only when both fields are filled.
Apply PHP input validation using preg_match to enforce that names contain only letters and whitespace and that websites follow a valid format, testing invalid and valid submissions.
Course: Learn PHP - For Beginners
Learn to create dynamic web applications using PHP
Students learn to integrate client-server communication into web pages to create dynamic functionality using PHP.
We start with the fundamentals, including PHP syntax and variable declaration. The course transitions into working with objects, arithmetic operators, conditional statements, loops, functions and arrays.
Students will also learn to utilize server side form validation techniques to maintain data integrity.
What you'll learn - Overview:
PHP Syntax
PHP Variables
PHP Global vs. Static Keywords
PHP Data Types
PHP Objects
PHP Strings
PHP Constants
PHP Conditional Statements & Operators
PHP Loops, Arrays, Multidimensional Arrays
PHP Superglobal Variables
PHP Forms with Validation
Key Concepts:
PHP Introduction
PHP Preparation
PHP File Test
PHP Syntax
PHP Variables
PHP Variable Scope
PHP Global Keyword
PHP Static Keyword
PHP Echo - Print
PHP Data Types
PHP Objects
PHP Strings
PHP Constants
PHP Operators
PHP Conditional Statements
PHP ElseIf Statement
PHP Switch Statement
PHP While Loops
PHP For Loops
PHP Functions
PHP Functions Continued
PHP Arrays
PHP Multidimensional Arrays
PHP Sorting Arrays
PHP Superglobal Variables
PHP Forms Introduction
PHP POST vs GET Basics
PHP Form Output and Validation
PHP Form Required Fields
PHP Validation Continued
Your Instructor:
YouAccel is a leading provider in online training, offering courses across numerous industries from IT and Development to Business, Marketing, Design, and Productivity.
The e-learning experience provided by YouAccel is Dynamic. Each course is streamed in High Definition with corresponding assignments, quizzes, and exams that are delivered and graded electronically. All YouAccel courses are taught by certified educators that have numerous years of work experience in the field for which they provide instruction.
The courses can be taken at one's own pace and are offered at several levels including beginner, intermediate and advanced. Online courses are also compatible with any mobile device for the ultimate in convenience.