Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • epots9
    Recognized Expert Top Contributor
    • May 2007
    • 1352

    #1

    Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE

    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...

    [CODE=php]
    if($specs[0] == "DT")
    {
    $angle = $specs[1];
    $rating = $specs[4];
    if($angle == "00" || $angle == "30")
    {
    $drive = "0 or 30 deg";
    }
    elseif($angle == "20" || $angle == "+20")
    {
    $drive = "+ or - 20 deg";
    }
    }
    [/CODE]

    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.
    Last edited by pbmods; May 23 '07, 03:44 AM. Reason: changed code language. Thanks for using CODE tags!
  • epots9
    Recognized Expert Top Contributor
    • May 2007
    • 1352

    #2
    nm, i found the error

    there was a ` in the code, i didn't relies it, just thought it was a dead pixel

    Comment

    Working...