Home > Backend Development > PHP Tutorial > 请教怎么用键名分组

请教怎么用键名分组

WBOY
Release: 2016-06-13 12:32:25
Original
759 people have browsed it

请问如何用键名分组?

$arr1 = array (<br />
'0' => array ('fid' => 1, 'tid' => 1 , 'name' =>'Name2' ),<br />
'2' => array ('fid' => 1, 'tid' => 1,  'name' =>'Name1' ),<br />
'1' => array ('fid' => 1, 'tid' => 5 , 'name' =>'Name3' ),<br />
'3' => array ('fid' => 1, 'tid' => 7 , 'name' =>'Name4' ),<br />
'4' => array ('sid' => 2, 'tid' => 9,  'name' =>'Name5' ),<br />
'5' => array ('cid' => 2, 'tid' => 9,  'name' =>'Name5' )<br />
);
Copy after login


请问有什么最快的方法可以以键名fid,sid,cid分组。

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