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

请教个基础的数组问题

WBOY
Release: 2016-06-23 13:53:33
Original
844 people have browsed it

怎么样可以将这个数组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);
Copy after login
Copy after login

一维数组?

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

thank you!
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template