at the moment my code is like this
echo '<script type="text/javascript">';
echo '<audio id="player" src="../cdh/ba1.mp3">';
echo '</script>';
echo '<a onclick="playAudio();"><i class=\'fa fa-lg fa-volume-up\'></i></a>';
echo '<script type="text/javascript">';
echo 'function playAudio(){var audio = new Audio("../cdh/ba1.mp3");';
echo 'audio.play();}';
echo '</script>';
I want to get my src="..." & var audio = ... working with a php variable I have. I have variable $row0['PIN'] which is the exact same as its filename - $row0['PIN'] is made up of Chinese pinyin so things like ba1 and ba1 jia1.
How can I do this?