M3 Flashcards
is used to aggregate a series of similar items together, arranging and dereferencing them in some specific way.
array
T/F You need to declare how many elements that the array variable have.
False
Array index in PHP can be also called as
array keys
Array can be used as ordinary array same as in ______ and _______
C, C++
This takes an argument of any type and prints it out, which includes printing all its parts recursively.
print_r()
» print recursive
is same as the print_r function except that it prints additional information about the size and type of the values it discovers
var_dump()
functions are commonly used for debugging. The point of this of these functions is to help you visualize what’s going on with compound data structures like arrays.
print_r()
var_dump()
is a statement used to iterate or loop through the element in an array.
foreach()
With each loop, a _______ statement moves to the next element in an array.
foreach
Sorts by value; assign new numbers as the keys
sort($array)
Sorts by value in reverse order; assign new number as the keys
rsort($array)
Sorts by value; keeps the same key
asort($array)
Sorts by value in reverse order; keeps the same key
arsort($array)
Sorts by key
ksort($array)
Sorts by key in reverse order
krsort($array)