By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,441 Members | 979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,441 IT Pros & Developers. It's quick & easy.

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE

epots9
Expert 100+
P: 1,351
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/html/xxx.php on line xxx

I get that message when i try to run my script, but if i disable an if statement (code below) then my code functions correctly...

Expand|Select|Wrap|Line Numbers
  1. if($specs[0] == "DT")
  2.     {
  3.         $angle = $specs[1];
  4.         $rating = $specs[4];
  5.         if($angle == "00" || $angle == "30")
  6.         {
  7.             $drive = "0 or 30 deg";
  8.         }
  9.         elseif($angle == "20" || $angle == "+20")
  10.         {
  11.             $drive = "+ or - 20 deg";
  12.         }
  13.     }
  14.  
but the error doesn't say it has anything to do with that code tho, it complains about a line of code 14 lines down the page.
May 22 '07 #1
Share this Question
Share on Google+
1 Reply


epots9
Expert 100+
P: 1,351
nm, i found the error

there was a ` in the code, i didn't relies it, just thought it was a dead pixel
May 22 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.