我正在使用 Doctrine 2,当我得到如下数组时。
我必须按“标题”对整个内容进行排序,它具有品牌名称、型号名称、发动机容量的级别,我需要对所有标题进行排序
$repo = $em->getRepository ( 'Teon_Model_Folder' );
$tree = $repo->childrenHierarchy ();
我得到这样的结果,我需要按每个级别的标题排序
array
0 =>
array
'id' => int 28
'title' => string 'BMW' (length=3)
'slug' => string 'bmw' (length=3)
'flags' => null
'lft' => int 2
'lvl' => int 1
'rgt' => int 105
'root' => int 25
'__children' =>
array
0 =>
array
'id' => int 128
'title' => string '3-series' (length=3)
'flags' => null
'lvl' => int 2
......
1 =>
array
...
2 =>
array
...
3 =>
array
...
4 =>
array
...
5 =>
array
...
1 =>
array
'id' => int 46
'title' => string 'Ford' (length=4)
'slug' => string 'ford' (length=4)
'flags' => null
'lft' => int 106
'lvl' => int 1
'rgt' => int 113
'root' => int 25
'__children' =>
array
0 =>
array
...
2 =>
array
'id' => int 56
'title' => string 'Honda' (length=5)
'slug' => string 'honda' (length=5)
'flags' => null
'lft' => int 114
'lvl' => int 1
'rgt' => int 123
'root' => int 25
'__children' =>
array
0 =>
array
...