M3 Flashcards

1
Q

is used to aggregate a series of similar items together, arranging and dereferencing them in some specific way.

A

array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

T/F You need to declare how many elements that the array variable have.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Array index in PHP can be also called as

A

array keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Array can be used as ordinary array same as in ______ and _______

A

C, C++

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

This takes an argument of any type and prints it out, which includes printing all its parts recursively.

A

print_r()
» print recursive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

is same as the print_r function except that it prints additional information about the size and type of the values it discovers

A

var_dump()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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.

A

print_r()
var_dump()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

is a statement used to iterate or loop through the element in an array.

A

foreach()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

With each loop, a _______ statement moves to the next element in an array.

A

foreach

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Sorts by value; assign new numbers as the keys

A

sort($array)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Sorts by value in reverse order; assign new number as the keys

A

rsort($array)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Sorts by value; keeps the same key

A

asort($array)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Sorts by value in reverse order; keeps the same key

A

arsort($array)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Sorts by key

A

ksort($array)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Sorts by key in reverse order

A

krsort($array)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Sorts by a function

A

usort($array, functionname)

17
Q

is a group of PHP statements that performs a specific task.

A

function

18
Q

are designed to allow you to reuse the same code in different locations.

A

function

19
Q

functions that are provided by the user of the program

A

user defined functions

20
Q

functions that are built-in into PHP to perform some standard operations

A

predefined functions

21
Q

keyword used to declare a function

A

function

22
Q

declared outside a function and is available to all parts of the program

A

global variables

23
Q

declared inside a function and only available within the function in which it is declared

A

local variables

24
Q

used to retain the values calls to the same function

A

static variables