Are there any built-in PHP functions or tricks to streamline the process of indexing arrays with specific keys from a database query?

When fetching data from a database query in PHP, you may need to index the resulting array with specific keys for easier access. One way to streamline this process is by using the `array_column()` function to extract a column of values from the result set and use it as keys for the indexed array.

// Assuming $results is the array fetched from a database query
// Assuming 'id' is the key you want to index the array with

$indexedResults = array_column($results, null, 'id');