array(2) {    [0]=>    string(9) "www.1.co"/>   array(2) {    [0]=>    string(9) "www.1.co">

Home  >  Article  >  Backend Development  >  这个foreach该如何写

这个foreach该如何写

WBOY
WBOYOriginal
2016-06-13 11:37:53796browse

这个foreach该怎么写?
表单提交了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)
{
这里应该怎么写?
}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn