Arrays - Study Mode
[#6] What function computes the difference of arrays?
Correct Answer
(A) array_diff
[#7] What functions count elements in an array? 1. count 2. Sizeof 3. Array_Count 4. Count_array
Correct Answer
(B) Option 1 and 2
[#8] What array will you get if you convert an object to an array?
Correct Answer
(A) An array with properties of that object as the array's elements
[#9] PHP’s numerically indexed array begin with position ______.
Correct Answer
(C) 0
Explanation
Solution: Like many programming languages, the first element of an array has an index value of 0.
[#10] Which function will return true if a variable is an array or false if it is not?
Correct Answer
(B) is_array()
Explanation
Solution: A built-in function, is_array(), is available for testing an array. Its prototype follows: boolean is_array(mixed variable).