PHP Tutorial Array
Introduction
- PHP Array
- PHP Create Indexed Array
- PHP Create Associative Arrays
- PHP Array Operator
- PHP Access Array Element
- PHP Change Array Element
- PHP Create Array using Square Bracket
- PHP Array Element Loop Through
- PHP Array foreach loop
- PHP Change Array Values with foreach
- PHP Array Multidimensional
- PHP Access Element in Multidimensional Array
- PHP Loop Through Multidimensional Array
Index
Demo
- Cast arrays to other data type in PHP
- Fill an array with values, specifying keys in PHP
- Return Array from a function in PHP
- Use an array to translate value in PHP
- Use the + with array in PHP
Length
- Count the array recursively in PHP
- Get The Length of an Array with count() Function in PHP
- Return the number of elements in an array in PHP
Create
- Create a multidimensional array in PHP
- Create an array from variables and their values in PHP
- Create an array to store multiple values in one single variable in PHP
- Create an array with string that does not match a variable, and an array of variable names in PHP
- Create an associative array in PHP
- Create and reference a multidimensional array in PHP
- Create indexed array, assign three elements, print a text containing the array values in PHP
- Create multi-dimensional arrays in PHP
- Initialize an array in PHP
Loop
- Loop Through a Two-Dimensional Array in PHP
- Loop Through an Indexed Array in PHP
- Loop string items in an array in PHP
- Loop through and print all the values of an indexed array in PHP
- Step Through an Array in PHP
- Use each() with a while loop in PHP
Output
- Output Arrays with print_r() in PHP
- Output the value of the current element in an array in PHP
- Output two dimensional array with print_r in PHP