Deck 6: Manipulating Arrays
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/83
العب
ملء الشاشة (f)
Deck 6: Manipulating Arrays
1
PHP creates indexed arrays by default with a starting element of 0.
False
2
The internal array pointer is a way of keeping track of which element you are working with in an array.
True
3
The array_name argument in the array_splice() function indicates the name of the array you want to eliminate.
False
4
The in_array() function returns a Boolean value of TRUE if a value exists in an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
5
The array_unique() function removes elements that are unique to an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
6
If you use an iteration function to move the internal array pointer either before the first element or after the last element in an array, the only way to move the array pointer back to a valid element is to use the unset() function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
7
The array_unique() function does not renumber the indexes after removing duplicate values in an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
8
You can use the unset() function to remove array elements and other variables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
9
One problem with the unset() function is that is does not renumber the remaining elements in the array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
10
The array_shift() function adds one or more elements to the beginning of an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
11
If you create an associative array and then add a new element without specifying a key, PHP will not assume that the array is indexed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
12
To remove an indexed array's elements, you need to run the array_values() function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
13
The array_values() function operates directly on an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
14
The array_splice() function adds or removes array elements located anywhere in an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
15
The array_push() function adds one or more elements to the end of an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
16
Aside from its main function, the array_splice() function also renumbers the indexes in the array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
17
You use the array_unshift() function to remove the first element from the beginning of an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
18
The internal array pointer is a special type of variable that refers to the currently selected element in an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
19
The last element is removed from the end of an array using the array_pop() function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
20
With associative arrays, you can use any alphanumeric keys that you want for the array elements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
21
Use the array_slice() function to return or copy a portion of an array and assign it to another array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
22
You refer to the values in a multidimensional indexed array by including two sets of brackets, one which refers to the row and one which refers to the column.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
23
The ____ function lets you add or remove elements anywhere else in the array.
A) array_add()
B) array_split()
C) array_splice()
D) array_values()
A) array_add()
B) array_split()
C) array_splice()
D) array_values()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
24
The array_unshift() function adds ____ element(s) to the beginning of the array.
A) one or more
B) two or more
C) no new
D) only one
A) one or more
B) two or more
C) no new
D) only one
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
25
The array_push() function ____ one or more elements to the end of the array.
A) adds
B) deletes
C) moves
D) pushes
A) adds
B) deletes
C) moves
D) pushes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
26
The most commonly used array sorting functions are sort() and rsort() for associative arrays.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
27
The array_search() function determines whether a given value exists in an array and returns the negative value of the first matching element is it exists or false if it does not exist.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
28
The ____ function removes duplicate elements from an array.
A) array_dup()
B) array_values()
C) array_unique()
D) array()
A) array_dup()
B) array_values()
C) array_unique()
D) array()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
29
To renumber an indexed array's elements, you need to run the ____ function.
A) unset()
B) array_values()
C) array()
D) array_num()
A) unset()
B) array_values()
C) array()
D) array_num()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
30
The array_diff() function returns an array of elements that exist in one array but not in any other arrays to which it is compared.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
31
To have PHP store form data in an array, you modify the name attribute of the input element to use array notation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
32
Instead of appending one array to another you can merge two or more arrays with the array_merge() function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
33
To remove multiple elements using the unset() function, separate each ____ name with commas.
A) variable
B) array
C) element
D) argument
A) variable
B) array
C) element
D) argument
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
34
PHP stores form data in an indexed array but cannot store form data in an associative array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
35
The ____ argument of the array_splice() function indicates the name of the array you want to modify.
A) array_name
B) array_value
C) array_function
D) array_mod
A) array_name
B) array_value
C) array_function
D) array_mod
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
36
Use the array_keys() function to return an indexed array containing all the keys in an associative array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
37
The array_key_exists() function determines whether a given index or key exists.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
38
The ____ is a special type of variable that refers to the currently selected element in an array.
A) external array pointer
B) external element pointer
C) internal array pointer
D) internal element pointer
A) external array pointer
B) external element pointer
C) internal array pointer
D) internal element pointer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
39
The array_shift() function removes the ____ element from the beginning of an array.
A) last
B) first
C) second
D) middle
A) last
B) first
C) second
D) middle
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
40
The array_pop() function ____ from the end of the array.
A) moves an element
B) copies the last element
C) deletes the first element
D) removes the last element
A) moves an element
B) copies the last element
C) deletes the first element
D) removes the last element
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
41
The most common type of multidimensional array is a(n) ____ array.
A) multidimensional
B) two-dimensional
C) associative
D) indexed
A) multidimensional
B) two-dimensional
C) associative
D) indexed
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
42
The array_pop() function removes the ____________________ elements from the end of the array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
43
A multidimensional array in PHP is essentially ____.
A) a two-dimensional array
B) nonexistent
C) an array of arrays
D) an associative array
A) a two-dimensional array
B) nonexistent
C) an array of arrays
D) an associative array
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
44
The symbol ____ appends one array to another.
A) *
B) ==
C) +
D) &&
A) *
B) ==
C) +
D) &&
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
45
You pass to the array_shift() function the name of the array whose first element you want to ____________________ .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
46
To sort an associative array by key, use the ____ function.
A) natsort()
B) ksort()
C) rsort()
D) asort()
A) natsort()
B) ksort()
C) rsort()
D) asort()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
47
To perform a reverse sort on an associative array by key and maintain the existing keys, use the _____ function.
A) ksort()
B) krsort()
C) uk_sort()
D) sort()
A) ksort()
B) krsort()
C) uk_sort()
D) sort()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
48
After adding or removing array elements, the ____________________ function also renumbers the indexes for an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
49
You can create ____ that consist of multiple indexes or keys.
A) indexed arrays
B) two-dimensional arrays
C) multidimensional arrays
D) key arrays
A) indexed arrays
B) two-dimensional arrays
C) multidimensional arrays
D) key arrays
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
50
If there are no indexes or keys entered in the value of the name attribute in a form, PHP assigns an index of ____ to the first element.
A) 0
B) 1
C) 2
D) PHP assigns no value
A) 0
B) 1
C) 2
D) PHP assigns no value
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
51
____________________ function removes the first element from the beginning of an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
52
The ____ function returns a Boolean value of true if a given value exists in the array.
A) array_search()
B) array_boole()
C) array()
D) in_array()
A) array_search()
B) array_boole()
C) array()
D) in_array()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
53
You use the ____ function to return a portion of an array and assign it to another array.
A) array_slice()
B) array_set()
C) array_assign()
D) array_key()
A) array_slice()
B) array_set()
C) array_assign()
D) array_key()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
54
The ____ function determines whether a given index or key exists.
A) array_values()
B) array_key_exists()
C) array_key()
D) array_set()
A) array_values()
B) array_key_exists()
C) array_key()
D) array_set()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
55
The ____ function returns an array of elements that exist in one array but not in any other arrays to which it is compared.
A) array_compare()
B) array_diff()
C) array_search()
D) array_match()
A) array_compare()
B) array_diff()
C) array_search()
D) array_match()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
56
Merge two or more arrays with the ____ function.
A) array_merge()
B) array_plus()
C) array_paste()
D) array_values()
A) array_merge()
B) array_plus()
C) array_paste()
D) array_values()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
57
The ____________________ function adds one or more elements to the end of an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
58
Multidimensional arrays are not limited to ____.
A) two dimensions
B) associative arrays
C) indexed elements
D) recursive arrays
A) two dimensions
B) associative arrays
C) indexed elements
D) recursive arrays
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
59
The data values for input elements that use array notation for the value of the name attribute are stored in a ____ array within the $_POST autoglobal array.
A) sub
B) nested
C) indexed
D) key
A) sub
B) nested
C) indexed
D) key
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
60
The ____ function determines whether a given value exists in an array.
A) array_search()
B) in_array()
C) find_array()
D) array_values()
A) array_search()
B) in_array()
C) find_array()
D) array_values()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
61
To remove multiple elements using the unset() function, you must separate each element name with a ____________________ .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
62
You would use the ____________________ function t return an array of the elements that are common to all arrays that are compared.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
63
As with the array_values() function the ____________________ function does not operate directly on an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
64
The ____________________ function does not operate directly on an array; but, returns a new array with the renumbered indexes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
65
The____________________ function returns a Boolean value of TRUE if a given value exists in an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
66
The ____________________ is a special type of variable that refers to the currently selected element in an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
67
You use the ____________________ function to create a new associative array that uses the values from one array as keys and the values from another array as element values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
68
You pass the unset() function the array name and the ____________________ of the element you want to remove.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
69
The ____________________ function moves the internal array pointer to the last element in an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
70
Instead of appending one array to another, you can merge two or more arrays with the ____________________ function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
71
The start_index argument of the array_slice() function indicates the ____________________ position within the array to begin extracting elements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
72
The ____________________ function determines whether a given value exists in an array and returns the index or key of the first matching element if it exists or FALSE if it does not.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
73
Run the ____________________ function to renumber an indexed array's element.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
74
To assign the first element of an associative array with a number other than zero (0), use the array operator ____________________ .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
75
The array_unique() function removes ____________________ elements from an array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
76
The array_key_exists() function determines whether a given____________________ or key exists.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
77
To refer to an element in an associative array, you place an element's ____________________ in single or double quotation marks inside the array brackets.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
78
The ____________________ function removes array elements and other variables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
79
To randomize the order of array elements, you can use the ____________________ function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck
80
The most commonly used array sorting functions are ____________________ and rsort() for indexed arrays.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 83 في هذه المجموعة.
فتح الحزمة
k this deck