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 9019097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:41:40+00:00 2026-06-16T04:41:40+00:00

I get an syntax error, unexpected T_STRING in this function on the 2nd line:

  • 0

I get an syntax error, unexpected T_STRING in this function on the 2nd line:

function format_date($unixtime) {
return date(“F”, $unixtime).” “.date(“d”, $unixtime).”, “.date(“Y”, $unixtime);
}

I’m following this tutorial http://tatiyants.com/how-to-use-wordpress-custom-post-types-to-add-events-to-your-site/

I’ve followed this to the letter and did nothing more than copy and paste so far.

In the comments you can read that the function above is missing and the author says to include it anyware in the php file. This seems to solve it for everybody except one other person and me.

So maybe the problem is related with the version of PHP or MySQL? Although Netbeans also says there is a syntax error in the code above.

  • 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-16T04:41:42+00:00Added an answer on June 16, 2026 at 4:41 am

    It’s because you copied and pasted from a badly written blog post and you have invalid curly quotes in your code. Change them to single or double-quotes:

     return date("F", $unixtime)." ".date("d", $unixtime).", ".date("Y", $unixtime);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't figure out why I get this error: Parse error: syntax error, unexpected
In the following script I get an error: syntax error: unexpected end of file
See also SO 1664677 I get this error 2: Syntax error: ( unexpected when
In running this on index.html, I get the following error: Uncaught SyntaxError: Unexpected token
Parse error: syntax error, unexpected $end in blah/blah/blah.php line 1 This is the error
I can't seem to get rid of this error- Parse error: syntax error, unexpected
I get an error that says Parse error: syntax error, unexpected T_PRIVATE in E:\PortableApps\xampp\htdocs\SN\AC\ACclass.php
Why do I always get the following error from Postgres? syntax error at or
I get this error when I run the application Incorrect syntax near 12 ,
I keep getting a Parse error: syntax error, unexpected T_STRING and im not sure

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.