1

I get the name of the songs from the database but i cannot play them all one after another.Here is my code for the view.

<?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');?>

i have the folder name music how can i play audio one by one?

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
john oliver
  • 88
  • 1
  • 10
  • Does this answer your question? [HTML 5 video or audio playlist](https://stackoverflow.com/questions/2551859/html-5-video-or-audio-playlist) – Quentin Jun 07 '22 at 12:51

0 Answers0