Answer & Solution
Answer: Option B
Solution:
Indexed arrays in PHP use integer indices, starting from zero, to access elements.
<?php
$colors = array("Red", "Green", "Blue");
echo $colors[1];
?
<?php
$person = array("name" => "John", "age" => 30, "city" => "New York");
echo $person["age"];
?
<?php
$matrix = array(
array(1, 2, 3),
array(4, 5, 6),
array(7, 8, 9)
);
echo $matrix[1][2];
?
<?php
$numbers = array(10, 20, 30, 40, 50);
echo count($numbers);
?