
Learn PHP by coding along with exercises and quizzes. Download the ready-to-use PHP files and follow lessons that build on each other.
Download and install XAMPP from Apache Friends to create a local PHP development environment on Windows, Linux, or Mac. Use the XAMPP control panel to start Apache and MySQL services.
Download brackets, the text editor used to write code, and install it. Set themes to monarchy, adjust the font size, and manage extensions to install themes, including monarchy from GitHub.
Download the course files before moving on to the next section, as lectures build on each other and require the materials for the PHP for beginners 2023 course.
Learn PHP syntax basics, including opening and closing tags, echo statements, and the short echo tag. Discover running scripts on localhost, using .php files, and avoiding trailing whitespace.
Learn to write single line and multi-line comments in PHP, using // or # for single lines and /* ... */ for blocks, to clarify intent and collaboration.
Explore PHP variables, including valid naming with the dollar sign, camel case, case sensitivity, and rules against reserved keywords, plus value versus reference assignment and isset/empty checks.
Define constants in PHP using define, name them in uppercase, and echo their values; constants cannot change at runtime, and you can test with defined and magic constants like __LINE__.
Explore PHP data types, including scalars, compounds, and specials, and learn how variables determine types with strings, integers, floats, booleans, arrays, objects, and null.
Explore basic arithmetic operations in PHP by performing addition, subtraction, multiplication, division, and modulus to see results like 15, 5, 50, 2, and 0.
Learn how to use PHP's increment and decrement operators, including pre-increment, post-increment, pre-decrement, and post-decrement, with practical examples on a variable starting at 10.
Learn assignment with math operators in PHP using shorthand, like x += y, replacing x = x + y, and apply to addition, subtraction, multiplication, and division.
Explore the standard order of operation in math as PHP follows bidmas, using brackets to change results in expressions like division, multiplication, and addition or subtraction.
Learn to convert numbers in PHP using casting and helper functions. Convert strings to integers or floats with (int) and (float) casts, intval, and floatval, then verify with vardump.
Learn to check numbers in PHP with is int, is float, and is numeric to identify integers, floats, and numeric values.
Explore advanced number handling in PHP, including abs, pow, sqrt, max, min, and rounding with round and floor.
Practice PHP arithmetic by post-incrementing X, adding six, and echoing the result to obtain ten. Cast Y to an integer and show ten modulus three equals one.
Create strings in PHP by using single quotes or double quotes. Observe that double quotes evaluate variables, while single quotes do not, preparing you for string concatenation.
Learn PHP string concatenation using the period operator, the concatenating assignment operator, and variable interpolation with braces, including spacing and escaping characters.
Learn how to escape string characters in PHP using a backslash, fix parse errors from unescaped quotes, and ensure proper output when a sentence contains I'm ready.
Learn to access string characters in php using zero-based indices, retrieve the first character, and access from the end with negative indices; modify characters by assignment.
Explore PHP string functions such as string word count, string length, substring, str_replace, and string contains, then apply the U.S. words function to capitalize each word.
Discover multiline text in php using here doc and now doc, assign to a variable, and display or decode html with the html special characters and html entity decode functions.
Learn PHP by creating a multi-line text containing HTML, defining a year variable as 1994, and formatting a number to two decimals with comma thousand separators, displayed in indian rupees.
Learn to create PHP arrays with the old array() method and the new [] syntax, then print, access by index, modify values, and append elements.
Master php array functions by building a students array, adding with push and at the beginning, removing with pop and shift, and checking with in_array and array_search, then sorting.
Convert a string into an array in PHP using explode with a comma delimiter, then access elements with current, end, and next functions, and display results with print and echo.
Learn how to convert an array to a string with the implode function, using a chosen glue like a comma or underscore to join elements.
Merge arrays in PHP with array_merge, combining two arrays into one and showing how input order changes the resulting sequence, such as one two three and four five six.
Learn how to compare two PHP arrays using array_diff and array_diff_assoc to identify values and key-value mismatches, including handling numeric and associative arrays.
Explore associative arrays in PHP by building key-value pairs, accessing and modifying values with keys, and extending arrays with new keys while using array_values and array_keys.
Practice converting a string like example.pdf into an array by splitting on a period with explode, then print the array; also create and print a range from 11 to 20.
Learn PHP comparison operators: equal to, not equals, identical, not identical, greater than, greater than or equal, less than, less than or equal, and the spaceship operator, with boolean outputs.
Explore php logical operators, including end (&&) and end as words, or (||) and xor, and not (!); learn how symbol precedence vs word precedence affects boolean expressions.
Master PHP conditionals by building if statements, else, and else if branches to print age-based outputs like you are very young, very old, or fairly young based on boolean expressions.
Explore the ternary operator as a compact form of if-else, using age to return 'young' or 'old,' and learn the ternary short form for 'age not set' with warnings.
Shows how to use a switch to compare a single value against multiple cases, mapping payment status to successful, pending, or failed, with break, default, and loose comparison notes.
PHP's match provides an alternative to switch by mapping payment status values to outcomes; 1 equals payment successful, 2 pending, 3 equals failed, with a default and strict comparison.
Practice PHP basics by converting a switch to a match statement for the day of the week and transforming an if-else into a ternary expression, with code output demonstrations.
Understand how a while loop repeatedly executes a block by initializing i to 1, testing i < 5, and incrementing to print numbers 1 through 4, preventing infinite loop.
Learn how to write a for loop in PHP with initializer, condition, and incrementer, print values using echo from 1 to 4, and understand loop termination when i reaches 5.
Discover how to use the foreach loop in php to iterate over arrays, access keys and values, and print key value pairs for both numeric and associative arrays.
Learn PHP basics by solving exercises that use a while loop to print 1 to 10 and flag even numbers, and a foreach loop to reveal data types with gettype.
Define a function as a reusable block of code using the function keyword and a name, then call it with parentheses to execute its statements, producing outputs like hello.
Define inputs with parameters and supply values as arguments in function calls. See how name and surname produce outputs like hello Kevin, Tim, and Sally, and explore optional arguments.
Learn how to use optional arguments in PHP by assigning default (null) values to parameters to prevent fatal errors when required arguments are missing, and see example outputs.
Explore how the return keyword sends a value from a function to its caller, demonstrated with a color example, and note that code after return does not execute.
Explain argument type hinting by restricting function parameters to strings, enforcing strict types, and triggering fatal errors; extend to strings or integers with the pipe and introduce the splat operator.
Discover how the splat operator (...) lets a PHP function accept multiple arguments, store them in an array, and sum them with the array sum function, then explore variable scopes.
Explain how local and global variable scopes work in PHP by demonstrating access inside and outside functions and the use of the global keyword.
Master defining anonymous functions with the function keyword, assigning them to a variable like grid, calling with grid(), and passing a name to produce a greeting.
Learn to convert an anonymous function into a PHP arrow function using fn, drop the braces and return statement, and echo the resulting hello name output.
Define and convert a PHP anonymous function that multiplies two numbers, enforcing only floats or integers, into an arrow function and enable strict types for input validation.
Learn how to use include and require to share code across pages, understand include_once and require_once, and distinguish their behavior when files are missing or duplicated.
Are you wanting to dive into Web development but you don’t know where to start? Perhaps you have tried many online PHP courses but you can’t seem to grasp the concepts.
Well i have good news for you! You’re in the right place at the right time because I’ve created this course with people like you in mind.
What are you going to learn?
This PHP course will teach you all the foundational skills you need to know to become a PHP developer. You will learn all the basics of PHP, you're going to be working with numbers,Strings,Arrays,Operators,Functions,Importing files,Getting user input, Interacting with the File System ,MYSQL Database etc.
So why learn a language like PHP?
This PHP language has stood the test of time and is still in demand in the job market.PHP is used by 78.9% of all websites with a known server-side programming language. It's being used by several global and well-established companies like Facebook, WordPress, Wikipedia, Etsy to mention but a few. So PHP is here to stay.
So what are you waiting for? The sooner you enroll, the faster you’ll realize your dreams.
Thank you for your considering this course!