How can one sort a multi associated array in PHP based on a specific key value?

To sort a multi-dimensional associative array in PHP based on a specific key value, you can use the `array_multisort()` function. This function allows you to sort multiple arrays or a multi-dimensional array based on one or more key values. By specifying the key you want to sort by, you can reorder the array elements accordingly.

// Sample multi-dimensional associative array
$data = array(
    array('name' => 'John', 'age' => 30),
    array('name' => 'Alice', 'age' => 25),
    array('name' => 'Bob', 'age' => 35)
);

// Sort the array based on the 'age' key
array_multisort(array_column($data, 'age'), SORT_ASC, $data);

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