我正在从CSV中恢复数组并在使用while循环遍历它们之后获取这样的值:
(a) Array ( [0] => VAL11
[1] => VAL12
[2] => VAL13
[3] => VAL14
[4] => VAL15 )
(b) Array ( [0] => VAL21
[1] => VAL22
[2] => VAL23
[3] => VAL24
[4] => VAL25 )
我如何才能将Array(b)提取到自己的新数组中?
问题是所有数组的标识符都是相同的,仅基于数字键
由于
答案 0 :(得分:0)
我不知道,如果我完全理解你,但是:
$b = $data['b'];
答案 1 :(得分:0)
<?php
$array = array(array('VAL11','VAL12','VAL13','VAL14','VAL15'),array('VAL21','VAL22','VAL23','VAL24','VAL25'));
$newarr = $array[1];
?>
输出:
Array
(
[0] => VAL21
[1] => VAL22
[2] => VAL23
[3] => VAL24
[4] => VAL25
)