PHP MCQ Arrays in PHP MCQ Question #2388
MCQ Single Best Answer Not Set

QWhat will be the output of the following PHP code?
< ?php 
    $fruits = array ("apple", "orange", array ("pear", "mango"),
    "banana");
    echo (count($fruits, 1));
?>

ID: #2388 Arrays in PHP MCQ 1,268 views
Question Info
#2388Q ID
Not SetDifficulty
Arrays in PHP MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 3
  • B 4
  • C 5
  • D 6
Correct Answer: Option D

Explanation

The array entity holding pear and mango is counted as an item, just as its contents are.

Share This Question

Challenge a friend or share with your study group.