467,870 Members | 1,521 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,870 developers. It's quick & easy.

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE

epots9
Expert 1GB
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
  • viewed: 1996
Share:
1 Reply
epots9
Expert 1GB
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.

Similar topics

6 posts views Thread by Ehartwig | last post: by
8 posts views Thread by goatchaps | last post: by
15 posts views Thread by micky125 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.