I'm trying to get java-script or PHP code to read all mp3 files to my website so they can be played in the browser. At the moment I have to program each file individually and this takes a long time so I'm trying to find a way so that my code reads from a folder with all of my mp3 files within it. This is an example of what i have so far:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test</title>
</head>
<body>
audio 1
<audio controls>
<source src="audio1.mp3" type="audio/mpeg">
</audio>
audio 2
<audio controls>
<source src="audio2.mp3" type="audio/mpeg">
</audio>
</body>
Thanks for any help!