Home >Backend Development >PHP Tutorial >请教个基础的数组问题

请教个基础的数组问题

WBOY
WBOYOriginal
2016-06-23 13:53:33865browse

怎么样可以将这个数组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' );$arr[]= implode(',', $ar);print_r($arr);

一维数组?

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

thank you!
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