INLEIDING ARRAYS

0) Initialiseren van een array

array(3) { [0]=> string(4) "Vera" [1]=> string(5) "Peter" [2]=> string(4) "Daan" }
count($Piloten) = 3
bool(true)
bool(true)
Vera, Peter, Daan
string(17) "VeraxyPeterxyDaan"
cola, water, fruitsap, wijn
array(4) { [0]=> string(4) "cola" [1]=> string(5) "water" [2]=> string(8) "fruitsap" [3]=> string(4) "wijn" }
array(4) { [0]=> string(4) "cola" [1]=> string(8) "fruitsap" [2]=> string(5) "water" [3]=> string(4) "wijn" }

1) Array visualiseren zonder de "index"

ma, di, wo, do, vr, za, zo,

1 element uit de array (bv. ik wil "do")
$days[3] = do

2) Array visualiseren met de "index"

0 is de index van ma
1 is de index van di
2 is de index van wo
3 is de index van do
4 is de index van vr
5 is de index van za
6 is de index van zo

.
array(7) { [0]=> string(2) "ma" [1]=> string(2) "di" [2]=> string(2) "wo" [3]=> string(2) "do" [4]=> string(2) "vr" [5]=> string(2) "za" [6]=> string(2) "zo" }
Array
(
    [0] => ma
    [1] => di
    [2] => wo
    [3] => do
    [4] => vr
    [5] => za
    [6] => zo
)

3) Arrays met aparte 'index' en 'waarde'

ma -> lundi
di -> mardi
wo -> mercredi
do -> jeudi
vr -> vendredi
za -> samedi
zo -> dimanche

array(7) { ["ma"]=> string(5) "lundi" ["di"]=> string(5) "mardi" ["wo"]=> string(8) "mercredi" ["do"]=> string(5) "jeudi" ["vr"]=> string(8) "vendredi" ["za"]=> string(6) "samedi" ["zo"]=> string(8) "dimanche" }