s4salman Posted April 28, 2011 Share Posted April 28, 2011 hi i am getting syntax error in the following php code. Can any one help me in this regard. <?php echo "<script type=\"text/javascript\" src=\"http://funxy.com/sabaadmin/swfobject.js\"></script> <script type=\"text/javascript\"> var s1 = new SWFObject("http://www.funxy.com/sabaadmin/flvplayer.swf","single","320","280","7"); s1.addParam("allowfullscreen","true"); s1.addVariable("file","$player"); s1.addVariable("image","$image"); s1.addVariable("width","320"); s1.addVariable("height","280"); s1.write("player1"); </script>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/234990-syntax-error-with-embede-video-player/ Share on other sites More sharing options...
Maq Posted April 28, 2011 Share Posted April 28, 2011 What is the error? EDIT: I can tell you right now this line is syntactically incorrect. Your quotes are mixed up. var s1 = new SWFObject("http://www.funxy.com/sabaadmin/flvplayer.swf","single","320","280","7"); Quote Link to comment https://forums.phpfreaks.com/topic/234990-syntax-error-with-embede-video-player/#findComment-1207645 Share on other sites More sharing options...
s4salman Posted April 28, 2011 Author Share Posted April 28, 2011 thank you for your reply , this is the error : Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/funxy/public_html/salmobile.info/3gp-videos-download2.php on line 233 i am attaching the php file. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/234990-syntax-error-with-embede-video-player/#findComment-1207646 Share on other sites More sharing options...
JKG Posted April 28, 2011 Share Posted April 28, 2011 your gonna have to escape the quotes all the way through that, else change echo " to echo ' and get rid of the first escapes. line 224 and 233. or just replace lines 222 to 263 with this: <?php echo '<script type="text/javascript" src="http://funxy.com/sabaadmin/swfobject.js"></script> <script type="text/javascript"> var s1 = new SWFObject("http://www.funxy.com/sabaadmin/flvplayer.swf","single","320","280","7"); s1.addParam("allowfullscreen","true"); s1.addVariable("file","$player"); s1.addVariable("image","$image"); s1.addVariable("width","320"); s1.addVariable("height","280"); s1.write("player1"); </script>'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/234990-syntax-error-with-embede-video-player/#findComment-1207648 Share on other sites More sharing options...
JKG Posted April 28, 2011 Share Posted April 28, 2011 actually, why are you echo-ing that anyway?? Quote Link to comment https://forums.phpfreaks.com/topic/234990-syntax-error-with-embede-video-player/#findComment-1207650 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.