array_keys関数を利用すると、連想配列からキーを抽出して配列として取得することができます。
$prices = ['apple' => 100, 'orange' => 50, 'banana' => 30]; $fruits = array_keys($prices);