Home > Backend Development > PHP Tutorial > 如何 将这个二维数组拆分后组成新的一维数组

如何 将这个二维数组拆分后组成新的一维数组

WBOY
Release: 2016-06-20 12:39:11
Original
955 people have browsed it

array (size=4)
  0 => 
    array (size=1)
      'pid' => string '1' (length=1)
  1 => 
    array (size=1)
      'pid' => string '3' (length=1)
  2 => 
    array (size=1)
      'pid' => string '4' (length=1)
  3 => 
    array (size=1)
      'pid' => string '6' (length=1)
如何将这个二维数组拆分后组成像这样的一维数组
array (size=4)
      0=> string '1' (length=1),1=> string '3' (length=1),2=> string '4' (length=1),3=> string '6' (length=1)


回复讨论(解决方案)

$b = array_map(‘current, $a);

非常感谢你,用你的方法已解决。

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