nerdexam
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)
  • A
    3% (1)
  • B
    5% (2)
  • C
    74% (29)
  • D
    15% (6)
  • E
    3% (1)

Topics

#array_combine#key-value mapping#array creation

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice