<?php if(is_array($ranking) && count($ranking) > 0): ?>
    <option value="-1" ranking="-1">- Chọn -</option>
    <?php foreach ($ranking as $item): $ranking = isset($item['ranking']) ? $item['ranking'] : $item['order']; ?>
        <option value="<?php echo $item['track_id']; ?>" ranking="<?php echo $ranking ?>" ranking_id="<?php echo $item['id']; ?>">
            <?php echo $ranking . '. ' . $item['name_song'] . ' (ID= '.$item['track_id'].')'; ?>
        </option>
    <?php endforeach; ?>
<?php else: ?>
    <option value="-1" ranking="-1">- Chọn -</option>
<?php endif; ?>
