我从数据库中获取歌曲的名称,但我不能一个接一个地播放它们。这是我的视图代码。
<?php include('inc/header.php');?>
<div class="main">
<div class="audio-name">
<?php foreach ($view as $row) :?>
<li ><?php echo $row->audio;?></li>
<?php endforeach;?>
</div>
<center>
<audio id ="audio" controls="" loop>
<?php foreach ($view as $row) :?>
<source src="<?php echo base_url();?>musics/<?php echo $row->audio;?>" type="audio/mp3">
<?php endforeach;?>
</audio>
</center>
<center><a href="<?php echo base_url();?>admin/audio/showaudio" class='back'>Back to All song list</a></center>
</div>
<?php include('inc/footer.php');?>
我有文件夹名称音乐如何逐个播放音频?