Home  >  Article  >  Backend Development  >  请问个基础的数组有关问题

请问个基础的数组有关问题

WBOY
WBOYOriginal
2016-06-13 12:02:32956browse

请教个基础的数组问题
怎么样可以将这个数组Array ( [0] => 5,6,7,8,12 [1] => 5,9,10,13 [2] => 7,9,15,10 )
合成这样Array ( [0] =>5,6,7,8,12,5,9,10,13, 7,9,15,10)
把不同键值合到一个键值下面

------解决方案--------------------
一维数组?

$ar = Array ( 0 => '5,6,7,8,12', 1 => '5,9,10,13', 2 => '7,9,15,10' );<br />$arr[]= implode(',', $ar);<br />print_r($arr);

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