πŸ“Š PHP
Q. Which of the following is a correct way to create an associative array?
  • (A) $arr = ['name' => 'John', 'age' => 25];
  • (B) $arr = {name: 'John', age: 25};
  • (C) $arr = ('name' => 'John', 'age' => 25);
  • (D) $arr = array('John', 25);
πŸ’¬ Discuss
βœ… Correct Answer: (A) $arr = ['name' => 'John', 'age' => 25];

Explanation: Associative arrays use key => value pairs.

Explanation by: Rati Dubey
Associative arrays use key => value pairs.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
40
Total Visits
πŸ“½οΈ
6 mo ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
80%
Success Rate