I wrote a previous entry about “unexpected T_PAAMAYIM_NEKUDOTAYIM,” but today, I hit the inverse, “Expecting T_PAAMAYIM_NEKUDOTAYIM.” Again, I will keep this short.
Certain functions that expect variables such as “isset” followed by a non-string, non-integer word will cause this error. For example:
isset(where_is_the_dollar_sign);
And so ??????????? The solution to the error is ???????
The code you have posted is 100% valid (assuming those are single quotes and not ticks)
I get this same strange error and wonder if it’s related to this line of code,
which happens about 10 lines before the line of code being blamed:
if (!isset($_POST[‘sessDate’])) {
It relates to a form’s input field
defined in another page as
Anybody know?
It’s also caused if you do a foreach($arr as $key=>ohshitiforgotthedollar) … in case anybody gets this error and this comes up near the top…
Honestly, your guess is as good as mine. After all, it’s a parse error. Anything could be happening! 😛
Now why would isset(where_is_the_dollar_sign); cause the PHP interpreter to expect a double-colon? Wouldn’t it be expecting a dollar sign?
Could you possibly elaborate on why this error happens in this case?