Arrays in PHP MCQ

Programming Language > PHP

This is the MCQ questions and answers section on "PHP Arrays" with the explanation for various interview, competitive examination and entrance test. Solved examples with detailed answer description, explanation are given and it would be easy to understand. ➲ Arrays in PHP MCQ - Quiz


  • A 1
  • B 2
  • C 0
  • D -1
  • A sort()
  • B asort()
  • C rsort()
  • D dsort()
  • A (iii) and (iv)
  • B (ii) and (iii)
  • C Only (i)
  • D (ii), (iii) and (iv)
  • A mango
  • B Error
  • C peach
  • D 0
  • A last()
  • B before()
  • C prev()
  • D previous()
  • A orangebanana
  • B appleorange
  • C orangeorange
  • D appleapple
  • A True
  • B 1
  • C False
  • D 2
  • A array_unshift()
  • B into_array()
  • C inend_array()
  • D array_push()
  • A this_array()
  • B is_array()
  • C do_array()
  • D in_array()
  • A 3
  • B 4
  • C 5
  • D 6
  • A count()
  • B array_count()
  • C array_count_values()
  • D count_values()
  • A Array ( [0] => peach )
  • B Array ( [0] => apple [1] => mango [2] => peach )
  • C Array ( [0] => apple [1] => mango )
  • D Array ( [0] => peach [1] => pear [2] => orange )
  • A Error
  • B Array ( [0] => apple [1] => mango [2] => peach )
  • C Array ( [0] => apple [1] => mango )
  • D Array ( [0] => pear [1] => orange )
  • A 4hello2
  • B 4
  • C 2
  • D 6