目前,此代码块显示VLAN。我正在尝试只显示名称(TLSoIP_JB1,TLSoIP_JB2,TLSoIP_JB3)
Array (
[0] => Array ( [0] => TLSoIP_JB1 [1] => 1 )
[1] => Array ( [0] => TLSoIP_JB2 [1] => 2 )
[2] => Array ( [0] => TLSoIP_JB3 [1] => 3 )
)
问候菲利普
答案 0 :(得分:1)
您可以尝试:
foreach ($array as $key => $inner_array) {
echo $inner_array[0];
}
或者您可以将所需的值存储在单独的数组中,然后将其打印出来:
$new_array = array();
foreach ($array as $key => $inner_array) {
$new_array[] = $inner_array[0];
}
print_r($new_array);