Arrays
IT Notes → PHP @ December 22, 2020
- Arrays can be constructed using:
- array () construct.
- array operator [].
- Arrays can be printed using:
- print_ r() prints the array data recursively out and can be stored as a string.
- var_dump( ) prints out the data and data type recursively.
- var_export() prints out array data recursively as a PHP script.
- array(key = value) and array[key]=value.
- Merge arrays, e.g., $array3 = $array1 + $array2.
- extract($arr, EXTR_PREFIX_ALL).
- count ($arr,1) will count recursively the number of elements.
- The array cursors: reset(), end(), next(), and prev().
Subscribe
Login
0 Comments