我从数据库中获取数据,我想hotel_name
按字母顺序排序。如何使用 php 的sort
函数或任何其他方法来做到这一点?
foreach($selData as $row)
{
$name=$row['hotel_name'];
$distance_colombo=$row['distance_colombo'];
$distance_airport=$row['distance_airport'];
$description=$row['description'];
$activities=$row['activities'];
$str=(explode(',',$activities));
print_r($str);
}