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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:40:26+00:00 2026-06-14T23:40:26+00:00

I am getting the error: Parse error: syntax error, unexpected T_STRING in /mysite/my_library.php on

  • 0

I am getting the error:

Parse error: syntax error, unexpected T_STRING in /mysite/my_library.php on line 43

However, I can not find any synatx errors in the code that it suggests:

/*
 * Get Full Filter Name from Abbreviation
 */
function getFilterName ($filterAbbreviation) {
    $filters = array(
        "R" => "Restuarant",
        "B" => "Bar",
        "S" => "Store",
        "L" => "Lodging",
        "Q" => "Recreation",
        "G" => "Gas Station",
        "E" => "Entertainment",
        "C" => "Club"
    );
    return $filters[$filterAbbreviation];
}
/*
 * Parse Filterstring 
 */
function parseFilterString($filterString) {
    $returnVal = "";
    $filterLetters = str_split($filterString, 1);
    for($x = 0; $x < strlen($filterString); $x++) {
        $returnVal .= "(type <=> '" . getFilterName($filterLetters[$x]) . "') OR ";
    }    
    if (strlen($returnVal) > 0) $returnVal =  substr($returnVal,0,-4); //remove final " OR " from filterstring
    else $returnVal = "type = 'VOID'";  //if everything is filtered, make sure to set type to something not available
    return $returnVal;
}

Please note this code is referenced from the page the user is querying using require().

  • 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-14T23:40:27+00:00Added an answer on June 14, 2026 at 11:40 pm

    The reason (in your case) is that your editor has inserted a hidden character in the text. (The editor is a computer program, and all computer programs go wrong, sometimes!). The clue was that it appeared to complaining about a space, but a space is not a string unless surrounded by quotes, so something is wrong. And what is wrong is that it’s not a space, but something else…

    The solution is to remove this hidden character. The safest is to delete the line and retype it – but just in case the hidden character is within the end-line (CR/CRLF) markers, it’s best to delete the lines above and below as well.

    So, select the line above, the offending line and the line below (all in one go, three lines together). Hit “delete”. Then TYPE (do not cut and paste), but use the keyboard to type the offending lines back in.

    (Note – the this does not work, the error line may simply move. This is where delete fails to see the hidden character and only deletes the test it expects. The trick for this is to copy/paste everything execpt the offending line +/- 1 into another file, then type the offending line +/-1 into that new file. In your case, you didn’t need it, I’m just adding for completeness of answer).

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

Sidebar

Related Questions

I keep getting a Parse error: syntax error, unexpected T_STRING in /newref-exec.php on line
i'm getting this error: Parse error: syntax error, unexpected T_PRINT, expecting T_STRING in /homepages/26/d94605010/htdocs/lz/writecodeonline.com/php/index.php(190)
im getting this error: Parse error: syntax error, unexpected T_ECHO in /home/labvc/public_html/AT/site/getimages.php on line
I keep getting the error Parse error: syntax error, unexpected T_STRING on line #9
I'm getting an error Parse error: syntax error, unexpected T_STRING On the line with
I am getting this error Parse error : syntax error, unexpected T_STRING in /ho.../ssd/recording-goodbye.php
I keep getting a Parse error: syntax error, unexpected T_STRING and im not sure
I am getting the following error: Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION
I'm getting Parse error: syntax error, unexpected T_VARIABLE, expecting ')' on the line commented
I'm getting the below error on my server: Parse error: syntax error, unexpected T_STRING,

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.