我有一个从一些代码生成的数组:
if (($handle = fopen('/var/tmp/file.tsv', 'r')) !== FALSE) {
$nn = 0;
while (($data = fgetcsv($handle, 1000, '/t')) !== FALSE) {
$targetData = array();
foreach($targetColumns as $column)
$targetData[] = $data[$column];
$csvarray[$nn] = $targetData;
$nn++;
}
fclose($handle);
}
这给了我这个输出:
Array
(
[0] => Array
(
[0] => "92834029"
)
[1] => Array
(
[0] => "32926154"
)
[2] => Array
(
[0] => "84892302"
)
[3] => Array
(
[0] => "10499507"
)
)
我如何摆脱多维数组,而是让它成为一个干净的简单父数组?
Array
(
[0] => 92834029
[1] => 32926154
[2] => 84892302
[3] => 10499507
)