How can an array in PHP be sorted alphabetically?

To sort an array alphabetically in PHP, you can use the `sort()` function. This function will rearrange the elements of the array in alphabetical order. You can also use the `asort()` function if you want to maintain the key-value associations while sorting the array alphabetically.

// Example array to be sorted alphabetically
$fruits = array("Apple", "Banana", "Orange", "Mango");

// Sorting the array alphabetically
sort($fruits);

// Output the sorted array
print_r($fruits);