...
表单提交了2组数组过来:
array(2) {
["goods_id1"]=>
array(2) {
[0]=>
string(9) "www.1.com"
[1]=>
string(7) "商品1"
}
["goods_id2"]=>
array(2) {
[0]=>
string(9) "www.2.com"
[1]=>
string(7) "商品2"
}
}
怎样把 goods_id1 和 goods_id2 用foreache输出成这样:
商品1
商品2
foreach($_POST as $key => $value)
{
这里应该怎么写?
}
回复讨论(解决方案)
foreach($_POST as $key => $value)
{
echo "$value[1]";
}