我有这个数组:
$user_data = array();
while($row=mysql_fetch_array($result))
{
$user_data[$row['id_user']]['id_user'] = $row['id_user'];
$user_data[$row['id_user']]['firstname'] = $row['firstname'];
$user_data[$row['id_user']]['lastname'] = $row['lastname'];
$user_data[$row['id_user']]['avatar'] = $row['avatar'];
}
例如,我想使用 php(不是 sql 或 Jquery)按名字对其进行排序。