Correct:
Warning message
Explanation: Answer option A is correct.
The array_combine()
function is used to combine two arrays. It uses the first array as a key and the second array as a value. For example,
You want to run the following PHP code:
array_combine(array(1,2,3,6),array(4,5,6));
Here, the array_combine()
function creates an array by using one array for keys and another for its values and gives the following array as the output:
array(1=>4,2=>5,3=>6)
Note: Both parameters of the array_combine()
function should have an equal number of elements, otherwise it will produce a warning message.
Reference: http://in2.php.net/manual/en/function.array-combine.php