How can you append a key-value pair ($Key, $Value) to an array in PHP so that $array[$key] = $Value?

To append a key-value pair ($key, $value) to an array in PHP so that $array[$key] = $value, you can simply use the array assignment syntax. This will automatically create a new key in the array if it doesn't exist or update the value if the key already exists. Here is a PHP code snippet that demonstrates how to append a key-value pair to an array:

<?php
$array = array("a" => 1, "b" => 2);
$key = "c";
$value = 3;

$array[$key] = $value;

print_r($array);
?>