Arrays

Populate (fill) an index array with numbers

Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 [9] => 4 [10] => Kaity [11] => 14 )
Array
(
    [0] => 1
    [1] => 2
    [2] => 3
    [3] => 4
    [4] => 5
    [5] => 6
    [6] => 7
    [7] => 8
    [8] => 9
    [9] => 4
    [10] => Kaity
    [11] => 14
)

Populate an index array with days of the week

Array
(
    [0] => Red
    [1] => Orange
    [2] => Yellow
    [3] => Green
    [4] => Blue
    [5] => Purple
)

Populate an associative array with book data

Array
(
    [title] => Green Eggs and Ham
    [author] => Dr.Seuss
    [published] => 1960
)

Populate a multidimensional associative array with book data

Array
(
    [0] => Array
        (
            [title] => Green Eggs and Ham
            [author] => Dr.Seuss
            [published] => 1960
        )

    [1] => Array
        (
            [title] => Hop on Pop
            [author] => Dr.Seuss
            [published] => 1963
        )

    [2] => Array
        (
            [title] => One Fish Two Fish Red Fish Blue Fish
            [author] => Dr.Seuss
            [published] => 1960
        )

    [3] => Array
        (
            [title] => The Lorax
            [author] => Dr.Seuss
            [published] => 1971
        )

)