Jump to content

Print and apostrophe problem


davehardyuk

Recommended Posts

Hi guys, i have this code:

[code]print "
<body marginheight=\"0\" marginwidth=\"0\" leftmargin=\"0\" rightmargin=\"0\">
<object id=\"MediaPlayer\" width=\"360\" height=\"69\" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" type=\"application/x-oleobject\">
<param name=\"FileName\" Value=\"$fileid\">
<param name=\"ShowControls\" value=\"true\"><param name=\"ShowStatusBar\" value=\"true\">
<param name=\"ShowStatusBar\" value=\"true\"><param name=\"ShowDisplay\" value=\"false\">
<param name=\"autostart\" value=\"true\">
<EMBED SRC=\"$fileid\" WIDTH=\"360\" HEIGHT=\"69\" AUTOSTART=\"FALSE\" TYPE=\"audio/mpeg\"></EMBED>
</object>";[/code]

Which pulls in a variable called $fileid.

The problem is, sometimes the fileid has an apostrophe in the filename and it can't be played.

Any ideas on how to get around it?

Thanks,

Dave
Link to comment
https://forums.phpfreaks.com/topic/4608-print-and-apostrophe-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.