How to replace spaces with %20 in playlist for MP3 link? Posted in on August 01, 2012 by admin <?php $s = ‘http://www.domain.com/songs/4 THE SICK – 13 – Because Of U featuring Evan Eleazer.mp3’; $s = str_replace(” “, “%20”, $s); // OR $s = preg_replace(‘/ /i’, ‘%20’, $s); echo $s; ?> Output: http://www.domain.com/songs/4%20THE%20SICK%20-%2013%20-%20Because%20Of%20U%20featuring%20Evan%20Eleazer.mp3 Posted in: HTML5, Joomla, WordPress ← Does the paid version offer more features? Different playlist for different pages? →