我有以下 php 数组:
Array ( [0] => fdsa.txt
[1] => lubuntu-19.10-desktop-amd64.iso
[2] => Solicitacao_de_Liberacao_a_Rede_WIFI.xlsx
[teste\] => Array ( [0] => pasta1.txt [1] => pasta2.txt )
[teste2\] => Array ( [0] => pasta3.txt [1] => pasta4.txt ) )
我想用来foreach遍历数组并回显所有内容
foreach($map as $arquivo){
echo $arquivo."<br/>";
}
但我想显示数组的名称,而不是像这样显示其中的内容:
fdsa.txt
lubuntu-19.10-desktop-amd64.iso
Solicitacao_de_Liberacao_a_Rede_WIFI.xlsx
teste\
teste2\
慕容708150