I have a wordpress website, and I'm trying to get the results from a table in alphabetical order (Greek language). I have tried asort, but it does not work. I suppose I am missing something, but I cannot figure it out. Here is the code:
if($homeplayers) {
asort($homeplayers);
$i = 1; foreach ($homeplayers as $homeplayer) {
$output .= '<tr>';
$output .= '<td style="vertical-align:top;word-wrap:break-word;">';
$output .= leagueengine_fetch_player_emblem($homeplayer->player_id).leagueengine_fetch_data_from_id($homeplayer->player_id,'data_value' );
$output .= '</td>';
$output .= '<td style="text-align:center;vertical-align:top;">';
if(isset($_POST['import_last_home_lineups']) && in_array($homeplayer->player_id, $home_app)) {
$output .= '<input class="homeplayers" name="homeplayers[]" type="checkbox" checked="checked" value="'.$homeplayer->player_id.'">';
} else {
$output .= '<input class="homeplayers" name="homeplayers[]" type="checkbox" '.leagueengine_isplaying_tournament($tournament_id,$match_id,$homeplayer->player_id).' value="'.$homeplayer->player_id.'">';
}
$output .= '</td>';
$i++;
}
$output .= '<td></td>';
$output .= '</tr>';
}