问题
Array
(
[0] => Array
(
[0] => HUBZone Small Business
[1] => Small Disadvantaged Business
[2] => Service-Disabled Veteran Small Businesses
)
)
回答1:
$array ;
foreach($array as $key => $value){
foreach($value as $k => $val){
echo $val . "<br> ;
}
}
Output:
HUBZone Small Business
Small Disadvantaged Business
Service-Disabled Veteran Small Businesses
回答2:
print_r($array);
If given a string, integer or float, the value itself will be printed. If given an array, values will be presented in a format that shows keys and elements. Similar notation is used for objects.
For more info: php.net/print_r
回答3:
use foreach
loops.
For your above array:
foreach($arr as $a){
foreach($a as $k=>$v){
echo $v;
}
}
来源:https://stackoverflow.com/questions/22681206/how-can-i-print-multidimensional-arrays-in-php