我有一个数组数组( [0] => ["1","2","7","8","9"] )我想喜欢那个数组([0] => 1 [1] => 2 [2] => 7 [3] => 8 [4] => 9)我尝试 foreach 循环foreach($no_a as $key=>$val){ foreach($val as $k=>$v){ $newp_arr[] $v ; }}
1 回答
慕田峪9158850
TA贡献1794条经验 获得超7个赞
$result = $no_a[0];
$new_result = array();
for ($i=0; $i < 21 ; $i++) {
# code...
$num = $result[$i];
if(is_numeric($num))
{
$new_result[] = $result[$i];
}
}
print_r($new_result);
- 1 回答
- 0 关注
- 104 浏览
添加回答
举报
0/150
提交
取消