Evaluate the internal combination method of arrays PHPcodearray (1) {[0] & gt; array (11) {[& quot; order_sn & quot;] & gt; string (13) & quot; 2012031551539 & quot; [& quot; recede_goods_id & quot;] & gt; string (0) & quo evaluate the internal combination of arrays
PHP code
Array (1) {[0] => array (11) {["order_sn"] => string (13) "2012031551539" ["recede_goods_id"] => string (0) "" ["recede_num"] => string (3) "2, 1" ["add_time"] => string (10) & quot; 1331799888 & quot; [& quot; cause & quot;] = & quot; string (0) & quot; [& quot; type & quot;] = & quot; string (6) "change" ["add_manager"] => string (0) "" ["change_goods_id"] => string (4) "29,2" ["change_goods_size"] => array (2) {[0] => string (1) "2" [1] => string (1) "1"} ["change_goods"] => array (2) {[0] => array (3) {["goods_name"] => string (62) "seirui SWANRING semi-transparent striped ladies trousers orange half-transparent striped" ["goods_id"] => string (1) "2" ["goods_sn"] => string (10) "S12N605112"} [1] => array (3) {["goods_name"] => string (53) "seirui SWANRING sweet lady lace briefs pink" ["goods_id"] => string (2) "29" ["goods_sn"] => string (10) "S12N603171"} ["change_goods_size_name"] => array (2) {[0] => string (1) "M" [1] => string (1) "S "}}}
How to change the above array
PHP code
Array (1) {[0] => array (11) {["order_sn"] => string (13) "2012031551539" ["recede_goods_id"] => string (0) "" ["recede_num"] => string (3) "2, 1" ["add_time"] => string (10) & quot; 1331799888 & quot; [& quot; cause & quot;] = & quot; string (0) & quot; [& quot; type & quot;] = & quot; string (6) "change" ["add_manager"] => string (0) "" ["change_goods_id"] => string (4) "29,2" ["change_goods_size"] => array (2) {[0] => string (1) "2" [1] => string (1) "1"} ["change_goods"] => array (2) {[0] => array (3) {["goods_name"] => string (62) "seirui SWANRING semi-transparent striped ladies trousers orange half-transparent striped" ["goods_id"] => string (1) "2" ["goods_sn"] => string (10) "S12N605112" ["goods_size"] => string (1) "M"} [1] => array (3) {["goods_name"] => string (53) "seirui SWANRING sweet lady lace briefs pink" ["goods_id"] => string (2) "29" ["goods_sn"] => string (10) "S12N603171" ["goods_size"] => string (1) "S "}}}}
It is how to merge change_goods and change_goods_size_name. use change_goods_size_name to give the first value to change_goods, and create a new column named goods_size for change_goods. The second column is set to the second one. And so on
------ Solution --------------------
It is best to paste the sample array, not the var_dump stuff, it looks messy.