Zend
200-710 · Question #187
What will be the result of the following operation? ``php array_combine(array("A", "B", "C"), array(1,2,3)); ``
The correct answer is C. array("A"=>1,"B"=>2,"C"=>3). See the full explanation below for the reasoning.
Arrays
Question
What will be the result of the following operation?
array_combine(array("A", "B", "C"), array(1,2,3));
Options
- Aarray("A"=>"B","C",1,2,3)
- Barray(1,2,3,"A","B","C")
- Carray("A"=>1,"B"=>2,"C"=>3)
- Darray(1=>"A",2=>"B",3=>"C")
- Earray(1,2,3)
How the community answered
(39 responses)- A3% (1)
- B5% (2)
- C74% (29)
- D15% (6)
- E3% (1)
Topics
#array_combine#key-value mapping#array creation
Community Discussion
No community discussion yet for this question.