Skip to content

How to play sound with PHP?

$file_name = "sound.mp3";
echo '<audio autoplay="true" style="display:none;">
       <source src="'.$file_name.'">
      </audio>';
See also  PHP code snippet - How to validate video laravel?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.