Csv data as array

array(2) { [1] => array(4) { [0] => string(12) "somefoo here" [1] => string(13) "some bar here" [2] => string(14) "do not show me" [3] => string(2) "42" } [2] => array(4) { [0] => string(8) "more foo" [1] => string(8) "more bar" [2] => string(14) "more to ignore" [3] => string(2) "88" } }

Combined array

array(2) { [1] => array(3) { ["FOO"] => string(12) "somefoo here" ["BAR"] => string(13) "some bar here" ["QUZ"] => string(2) "42" } [2] => array(3) { ["FOO"] => string(8) "more foo" ["BAR"] => string(8) "more bar" ["QUZ"] => string(2) "88" } }