how to change character to % character? [message #183319] |
Sun, 20 October 2013 16:27 |
Mr Oldies
Messages: 241 Registered: October 2013
Karma:
|
Senior Member |
|
|
I noticed that whenever a song is clicked on that has an apostrophe in the
name, an error is now being generated.
The song still plays and the name is reported correctly.
So how can I detect any and all 's within a string and convert them to the
%27 version?
I had a look at preg-match and don't think that will help.
www.mroldies.net/200/
<?php
if ($show="none"){$song=$playme[$number][4];}
if ($show!="none") {$song=$playme[$show][4];}
echo 'jwplayer("player").setup({';
echo ' file: "'.$song.'.mp3",';
echo ' width: 480,';
echo ' height: 30,';
echo ' autostart:true';
echo '});';
?>
|
|
|