In PHP, what function can be used to sort an array in reverse order based on keys?
To sort an array in reverse order based on keys in PHP, you can use the `krsort()` function. This function will sort the array in descending order based on the keys. It is important to note that this function will re-order the keys in the array as well.
$fruits = array("apple" => 2, "orange" => 1, "banana" => 3);
krsort($fruits);
print_r($fruits);