Click to See Complete Forum and Search --> : Parse error: syntax error


cuteprincess2k
April 26th, 2008, 09:12 AM
Please help me ...

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/sycn664/public_html/phpbb/includes/functions.php on line 3438


And here is the line on functions.php that is showing the error ..

$lasttimechecked = $row['user_last_comm_check'];


thanks

hspc
April 26th, 2008, 09:35 AM
Sometimes errors are related to lines before the one mentioned in the error message. So try to look there too.

PeejAvery
April 26th, 2008, 04:47 PM
To add to what hspc has already said...Since you are using a variable named $row, I am assuming that this is an associative array from a database row. Is this the case?

If so, you might want to double-check your SQL query as well.

visualAd
April 26th, 2008, 05:20 PM
To add to what hspc has already said...Since you are using a variable named $row, I am assuming that this is an associative array from a database row. Is this the case?

If so, you might want to double-check your SQL query as well.
Parsing is carried out by the interpreter before the code is executed so therefore there won't be any distinction between weather the variable is an array / string or any other type.

The text of the error "unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING" suggests you may have forgotten a semi colon on the previous line.

PeejAvery
April 26th, 2008, 05:52 PM
Yes, you are correct visualAd, but...I saw that the OP also posted the same problem here (http://www.programmingtalk.com/showthread.php?p=145615). You will notice that his/her problem is incorrect quotations and setup of the SQL query. Hence what I said.

Issue was resolved in that forum.

visualAd
April 27th, 2008, 02:53 AM
That's where syntax highlighters come in useful. Error by colours :)