πŸ“Š PHP
Q. How do you create an associative array in PHP?
  • (A) $arr = array('key' => 'value');
  • (B) $arr = ['key' => 'value'];
  • (C) Both 1 and 2
  • (D) $arr = associative('key', 'value');
πŸ’¬ Discuss
βœ… Correct Answer: (C) Both 1 and 2

Explanation: PHP allows associative arrays using both array() and [] syntax.

Explanation by: Rati Dubey
PHP allows associative arrays using both array() and [] syntax.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
56
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
92%
Success Rate