Jump to content

Strange error message help


soycharliente

Recommended Posts

Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in /file.php on line 85

 

Anyone ever seen anything like this before? Have no idea what's going on. Furthermore, here is line 85. I personally don't see any extra close parenthesis. Maybe a fresh pair of eyes does?

<?php
echo (!empty(ADDRESS)) ? '<li>'.address(ADDRESS).'</li>' : ''; //LINE 85 HERE
echo (!empty(PHONE))   ? '<li>'.phone(PHONE,'.').'</li>' : '';
echo (!empty(EMAIL))   ? '<li><a href="'.EMAIL.'" target="_blank">Email this link</a> to '.TYPE_LAST.'</li>' : '';
echo (!empty(SITE))    ? '<li><a href="'.SITE.'" target="_blank">'.SITE.'</a></li>' : '';
?>

 

Any help? Thanks.

Link to comment
Share on other sites

Syntax errors are often reported on a line after where the actual problem is located. This is because the language parser cannot determine what the programmer intended when he left out some piece of syntax. I would suggest posting about 5 lines of code prior to the line where the error is being reported.

Link to comment
Share on other sites

Couldn't ever find any double colons or double anythings.

 

I have no idea if this is correct, but I was combining define() with ternary operators and now I'm not. Now it's working properly. Maybe that knowledge, whether right or wrong, will help someone.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.