データベースから配列値を取得しています。それは単なるユーザーの名前です。取得したとおりに印刷します。名前のアルファベット順 (昇順) で印刷したいと思います。これどうやってするの ?
foreach($common_follows as $row) // $common_follows contains the IDs of users
{
$names=$obj2->get_user_name($row); //this function gets the name from user ID
while ($rows = mysql_fetch_assoc($names)) // For getting the name of the person being followed
{
sort($rows['name']); //Not seems to sort
echo '<img src="https://graph.facebook.com/'.$rows['user_id'].'/picture?type=normal" width="65" height="20" id="fbthumb">';
echo $rows['name']."<br>";
$count_common++;
}
}
ループの反復ごとに単一の名前が返されるため、このソート機能は機能していないようです。