Q. Which of the following is the correct way to declare an associative array?
β
Correct Answer: (A)
$arr = array('key1' => 'value1', 'key2' => 'value2');
Explanation: Associative arrays use key => value pairs.