πŸ“Š PHP
Q. What will be the output?
Code:
$arr = ["x" => 1, "y" => 2];
echo $arr["y"];
  • (A) 1
  • (B) 2
  • (C) Error
  • (D) 0
πŸ’¬ Discuss
βœ… Correct Answer: (B) 2

Explanation: Accessing associative array value for key 'y'.

Explanation by: Roshan
Accessing associative array value for key 'y'.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
3
Total Visits
πŸ“½οΈ
8 d ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
92%
Success Rate