<legend id='76rj6'><style id='76rj6'><dir id='76rj6'><q id='76rj6'></q></dir></style></legend>

  1. <i id='76rj6'><tr id='76rj6'><dt id='76rj6'><q id='76rj6'><span id='76rj6'><b id='76rj6'><form id='76rj6'><ins id='76rj6'></ins><ul id='76rj6'></ul><sub id='76rj6'></sub></form><legend id='76rj6'></legend><bdo id='76rj6'><pre id='76rj6'><center id='76rj6'></center></pre></bdo></b><th id='76rj6'></th></span></q></dt></tr></i><div id='76rj6'><tfoot id='76rj6'></tfoot><dl id='76rj6'><fieldset id='76rj6'></fieldset></dl></div>
    <tfoot id='76rj6'></tfoot>
        <bdo id='76rj6'></bdo><ul id='76rj6'></ul>
    1. <small id='76rj6'></small><noframes id='76rj6'>

      数组合并具有相同索引的php

      array merge php with same index(数组合并具有相同索引的php)
        <tbody id='tKl1j'></tbody>

      1. <small id='tKl1j'></small><noframes id='tKl1j'>

          <legend id='tKl1j'><style id='tKl1j'><dir id='tKl1j'><q id='tKl1j'></q></dir></style></legend>

            <tfoot id='tKl1j'></tfoot>
              <bdo id='tKl1j'></bdo><ul id='tKl1j'></ul>
            • <i id='tKl1j'><tr id='tKl1j'><dt id='tKl1j'><q id='tKl1j'><span id='tKl1j'><b id='tKl1j'><form id='tKl1j'><ins id='tKl1j'></ins><ul id='tKl1j'></ul><sub id='tKl1j'></sub></form><legend id='tKl1j'></legend><bdo id='tKl1j'><pre id='tKl1j'><center id='tKl1j'></center></pre></bdo></b><th id='tKl1j'></th></span></q></dt></tr></i><div id='tKl1j'><tfoot id='tKl1j'></tfoot><dl id='tKl1j'><fieldset id='tKl1j'></fieldset></dl></div>

                本文介绍了数组合并具有相同索引的php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有这种情况:

                $qty = array(1) {[0]=> array(1) { ["qty"]=> string(5) "35254" }
                $price = array(1) {[0]=> array(1) { ["price"]=> string(5) "1000" }
                

                我怎样才能得到这个?

                $res = array(1) {[0]=> array(1) { ["qty"]=> string(5) "35254" ["price"]=> string(5) "1000"}
                

                感谢您的回答

                推荐答案

                也许就是你想要的:

                $res = array();
                foreach($qty as $k => $v){
                    $res[$k] = array_merge($qty[$k],$price[$k]);
                }
                

                结果:

                array(1) {[0] => array(2) { 'qty' => string(5) "35254" 'price' => string(4) "1000" } }
                

                这篇关于数组合并具有相同索引的php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Zend_Controller_Router_Exception: quot;xyzquot; is not specified(Zend_Controller_Router_Exception:“xyz;未指定)
                Zend_Db_Table subquery(Zend_Db_Table 子查询)
                pcntl_fork and the MySQL connection is gone(pcntl_fork 和 MySQL 连接消失了)
                Change layout in the controller of Zend Framework 2.0(在 Zend Framework 2.0 的控制器中更改布局)
                Zend Mail Gmail SMTP(Zend 邮件 Gmail SMTP)
                Zend_Form: how to check 2 fields are identical(Zend_Form:如何检查 2 个字段是否相同)
                  <tbody id='xm3Am'></tbody>
                  <bdo id='xm3Am'></bdo><ul id='xm3Am'></ul>
                • <tfoot id='xm3Am'></tfoot>

                  <small id='xm3Am'></small><noframes id='xm3Am'>

                    • <legend id='xm3Am'><style id='xm3Am'><dir id='xm3Am'><q id='xm3Am'></q></dir></style></legend>

                          <i id='xm3Am'><tr id='xm3Am'><dt id='xm3Am'><q id='xm3Am'><span id='xm3Am'><b id='xm3Am'><form id='xm3Am'><ins id='xm3Am'></ins><ul id='xm3Am'></ul><sub id='xm3Am'></sub></form><legend id='xm3Am'></legend><bdo id='xm3Am'><pre id='xm3Am'><center id='xm3Am'></center></pre></bdo></b><th id='xm3Am'></th></span></q></dt></tr></i><div id='xm3Am'><tfoot id='xm3Am'></tfoot><dl id='xm3Am'><fieldset id='xm3Am'></fieldset></dl></div>