Jump to content



  • Please log in to reply
2 replies to this topic

#1 JustFriend

  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 24 August 2013 - 06:25 PM

I want to make a Facebook Like Box and some After setting it on your index.php or game.php threw me an error that looks like this:


Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/manoww/domains/manowwe.us.lt/public_html/index.php on line 282


FaceBook Like Box: <iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fmanowwe&amp;width=300&amp;height=590&amp;colorscheme=light&amp;show_faces=true&amp;header=true&amp;stream=true&amp;show_border=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:590px;" allowTransparency="true"></iframe>


<b>Could you explain where the error?<b>

#2 priyankagound

  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 12 September 2013 - 11:56 AM

Syntax highlighting already shows you what's wrong. You need to use double quotes inside the string or escape the single quotes with a backslash.

When echoing code it's a good idea to use the heredoc quote syntax; you do not have to escape any quotes inside such a string:

echo <<<EOF
<script type="text/javascript">
window.addEvent('domready', function() {

Another solution would be simply ending the PHP mode:

<script type="text/javascript">
window.addEvent('domready', function() {

#3 Maq

  • Administrators
  • Advanced Member
  • 9,410 posts
  • LocationPennsylvania, USA

Posted 12 September 2013 - 07:30 PM

We need to see some code.

ini_set ("display_errors", "1");

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users