on loop the image file name is changing but audio file name is not changing so each time button play same audio while image is diffrent
<?php
$pth1="voice/alifbepati/";
$pth="images/ipapati/";
for ($x = 1; $x <= 52; $x++) {
echo $pth1.$x.".mp3";
global $filenm;
$filenm= $pth1.$x.".mp3";
echo "<img src=\"$pth".$x.".jpg\" width=75 height=75><BR>
<audio id=\"player\" src='$filenm'></audio>
<div>
<button onclick=\"document.getElementById('player').play()\" title='$filenm'>Play</button>
</div>
The number is: $x <br>";
}
?>