What does $animals contain? 2 $animals = "ostrich"; $animals =
"anteater"; $animals = "orangutan"; $animals = "cheetah"; $animals
= "hyena";
Slide 3
An array contains a set of data represented by a single
variable name A list of values 3 $animals[] ostrich anteater
orangutan cheetah hyena $animals[] = "ostrich"; $animals[] =
"anteater"; $animals[] = "orangutan"; $animals[] = "cheetah";
$animals[] = "hyena";
Slide 4
An element refers to a piece of data stored in an array An
index is an elements numeric position within the array By default,
indexes start with zero (0) An array element is referenced by
enclosing its index in brackets after the array name: print
$animals[0]; 4
Slide 5
PHP has a number of built-in arrays Example: $_SERVER Also
called autoglobal arrays $_SERVER $_POST $_GET $_COOKIE $_SESSION
5