阵列
$tagHolder[$row['id']] = array(
"name" => $row['name'],
"primary" => $row['primary'],
"child" => $row['child'],
"order" => $row['order']
);
usort功能
function sortAsc($x, $y){
if ( $x['order'] == $y['order'] )
return 0;
else if ( $x['order'] < $y['order'] )
return -1;
else
return 1;
}
按'order'命令BUT不会保留原始的$row['id']
键,而是将第一个prosition重新指定为0,依此类推。如何对sort函数进行排序,但保持$row['key']
不受影响?