This site is mobile accessible. Press the "Tap Here" button to use a different font-size.
Tap Here!
Smartphone icons created by Freepik - Flaticon
4.2 PHP Superglobals
CSS Fundamentals
HTML Fundamentals
JavaScript Fundamentals
SQL Fundamentals
PHP Fundamentals
Module 1. Intro
Module 2. Data Types
Module 3. Operators
Module 4. Arrays, Superglobals
Module 5. PHP Forms
Module 6. PHP Advanced
Module 7. PHP OOP
Module 8. MySQL Database
Module 9. PHP XML
Module 10. PHP - AJAX
Superglobals were introduced in PHP 4.1.0, and are built-in variables that are always available in all scopes.
PHP Global Variables - Superglobals
Some predefined variables in PHP are "superglobals", which means that they are always accessible, regardless of scope - and you can access them from any function, class or file without having to do anything special.
The PHP superglobal variables are:
$GLOBALS
$_SERVER
$_REQUEST
$_POST
$_GET
$_FILES
$_ENV
$_COOKIE
$_SESSION
The next chapters will explain some of the superglobals, and the rest will be explained in later chapters.
Animated PHP icons used in the buttons provided by ICONS8.COM .
Smartphone icons created by Freepik - Flaticon
Module 4 quiz
Example files created in this module:
PHP Arrays
Array Items
PHP Arrays - Get The Length of an Array with The count() Function
PHP Arrays - Change Value
Indexed Arrays - Loop Through an Indexed Array
PHP Arrays: Index Number part 1
PHP Arrays: Index Number part 2
PHP Arrays - Associative Arrays part 1
PHP Arrays - Associative Arrays part 2
PHP Arrays - Access Associative Arrays
PHP Associative Arrays: Change Key's Value
Associative Arrays - Loop Through an Associative Array part 1
Associative Arrays - Loop Through an Associative Array part 2
PHP Arrays - Two-dimensional Arrays
PHP Arrays - Two-dimensional Arrays with for loop
PHP Arrays - Sorting Arrays part 1
PHP Arrays - Sorting Arrays part 2
PHP Arrays - Sort Array in Descending Order rsort() part 1
PHP Arrays - Sort Array in Descending Order rsort() part 2
PHP Arrays - Sort Array (Ascending Order), According to Value asort()
PHP Arrays - Sort Array (Ascending Order), According to Key ksort()
PHP Arrays - Sort Array (Descending Order), According to Value arsort()
PHP Arrays - Sort Array (Descending Order), According to Key krsort()
PHP $GLOBALS
PHP $_SERVER
PHP $_REQUEST - Form Submission
PHP $_POST - Form Submission
Test Get
PHP RegEx - Using preg_match()
PHP RegEx - Using preg_match_all()
PHP RegEx - Using preg_replace()
PHP RegEx - Grouping