Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8673793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:33:03+00:00 2026-06-12T19:33:03+00:00

I get a message, when I run this code: function print_footer(){ global $file; echo

  • 0

I get a message, when I run this code:

function print_footer(){
global $file;
echo <<<EOT
<center>
<a href="$file?op=vote"> Vote </a> |
<a href="$file?op=admin"> Admin </a> | 
<hr>
$copy; 2012, Shibbir Ahmed, All Rights Reserved.
</center>
</body>
</html> 
EOT;        
}   

Error Message:

Parse error: syntax error, unexpected $end in D:\xampp server\xampp\htdocs\practice
\function.php on line …

What’s wrong in this PHP code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:33:04+00:00Added an answer on June 12, 2026 at 7:33 pm

    The code you have posted here have a bunch of spaces after the ending EOT;. That is not allowed in the PHP syntax:

    It is very important to note that the line with the closing identifier
    must contain no other characters, except possibly a semicolon (;).
    That means especially that the identifier may not be indented, and
    there may not be any spaces or tabs before or after the semicolon.

    What happens is that PHP does not see your ending specifier and it therefore continues to look for one, until it unexpectedly reaches the end of the file and throws an error.

    The solution is to make sure you have no spaces at all on the line where you have EOT;, neither before or after.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get following error message, when I try to run git rebase -i for
Problem: When I run my tests, I get the following message in the command
Each time I click the Run as button, I get the following message. The
If i wanted to get message for ViewData from resource file, depending on the
when I use MySQLdb get this message: /var/lib/python-support/python2.6/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated
Doing code analysis of the project and get the message Reference-counted object is used
In pthread_create I can specify one message, then on run time I may get
When I try to export my android application, I get this error message.. [2012-05-02
When I run the code with an admin user, the module returns what it
When I run this code the page repeats its self. I also need it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.