How to replace spaces with %20 in playlist for MP3 link?

<?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

About Us

We are one of the leading provider for HTML5 MP3/MP4 Horizontal Playlist, Vertical Playlist, Karaoke, Lyrics, FeedBurner Podcast, Amazon S3, AWS CloudFront, CDN, Wordpress, Joomla, Standalone, Video, Radio, Folder Player.

Connect With Us