Pulling one field out of a result set is a foreach that everyone writes and nobody enjoys. array_column() does it in one call, and its second use — building a lookup keyed by id — removes a second loop that usually sits right below the first.
$rows = [
['id' => 3, 'sku' => 'FR-100', 'price' => 4900],
['id' => 7, 'sku' => 'FR-220', 'price' => 7500],
];
array_column($rows, 'sku'); // ['FR-100', 'FR-220']
array_column($rows, 'price', 'id'); // [3 => 4900, 7 => 7500]
array_column($rows, null, 'id'); // whole rows, keyed by id
Passing null as the column keeps the entire row and only re-keys it, which is the fastest way to turn a list into a map before a lookup-heavy loop. It works on arrays of arrays only — objects are not accepted — so a result set fetched as objects needs PDO::FETCH_ASSOC first.