RE: parse error, unexpected T_ENCAPSED_AND_WHITESPACE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Schmidt <mailto:jsbiff@xxxxxxxxxxxxxxxxxxxxxx>
    on Monday, March 14, 2005 2:58 PM said:

> Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE,
> expecting T_STRING or T_VARIABLE or T_NUM_STRING in
> /hsphere/local/home/welding/weldingconsultants.com/wcapp/admin.php on
> line 82
> 
> Line 82 is:
> print '<td><input type=\'checkbox\' name=\'status[' .
> $row["profileID"] . ']' . "' value='true'/></td>\n";

Very likely the problem is not on line 82, but rather before it. Line 82
is just where the PHP parser finally gets screwed up.

> $profID = $row["profileID"];
> print '<td><input type=\'checkbox\' name=\'status[' . $profID . ']' .
> "' value='true'/></td>\n";
> 
> When I had done that, the parser started choking at the top line.

I suggest the following: (The HTML should all be on one line.)

echo "<td><input type=\"checkbox\" name=\"status[{$row['profileID']}]\"
value=\"true\" /></td>";

> I've attached the full file, to see the context that this is in.

Please don't send attachments to a public mailing list. Besides, I don't
think they go through anyway.

> Can *anyone* explain this error? It's completely breaking my script. I
> suspect, that the *real* error is somewhere earlier in the file, but
> I've read through it 20 times and just can't find anything out of
> place (can't find any obvious syntax errors, for example).

Post the file to a web server somewhere in plain text.



Chris.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux