• 技术文章 >后端开发 >php教程

    这个foreach该如何写

    2016-06-13 12:35:20原创379
    这个foreach该怎么写?
    表单提交了2组数组过来:
    array(2) {
    ["goods_id1"]=>
    array(2) {
    [0]=>
    string(9) "//m.sbmmt.com/m/article/www.1.com"
    [1]=>
    string(7) "商品1"
    }
    ["goods_id2"]=>
    array(2) {
    [0]=>
    string(9) "//m.sbmmt.com/m/article/www.2.com"
    [1]=>
    string(7) "商品2"
    }
    }

    怎样把 goods_id1 和 goods_id2 用foreache输出成这样:
    商品1
    商品2


    foreach($_POST as $key => $value)
    {
    这里应该怎么写?
    }

    20期PHP线上班

    相关文章推荐

    • 【活动】充值PHP中文网VIP即送云服务器• 【吐血整理】40+个PHP面试题附答案(实战经验)• PHP+javascript液晶时钟_php基础• Codeigniter控制器controller继承问题实例分析_php实例• 服务器迁移php版本不同可能诱发的问题_php实例• PHP Yii框架之表单验证规则大全_php实例
    1/1

    PHP中文网