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

  • SEARCH
  • Home
  • 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 7001075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:45:23+00:00 2026-05-27T20:45:23+00:00

I have an issue here, and I’m looking for experienced programmers to tell me

  • 0

I have an issue here, and I’m looking for experienced programmers to tell me which is the preferred solution.

I have values being returned that are surrounded in quotes. "TOTAL" and "VALUE" being two examples. These should not be confused with TOTAL and VALUE — the string is actually surrounded by double quotes.

What I noticed is that the switch statement below doesn’t work because it’s looking for TOTAL not "TOTAL":

switch ($statTypeName) {
    case "TOTAL":
        echo "<br>TOTAL";
        break;
    case "VALUE":
        echo "<br>VALUE";
        break;
}

To get this working, I had to put a single quote around the case — '"TOTAL"'.
In my text editor (Notepad++), it is difficult to see the single quote around the double quotes.

I know this isn’t a common issue, but what would be the “professional” way of solving this? The way I did it, or should I be extracting the string from the quoted string and do away with the double quotes altogether..?

Thanks!

  • 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-05-27T20:45:23+00:00Added an answer on May 27, 2026 at 8:45 pm

    What you’re running into is indeed common, and you can go about it a couple different ways. There’s nothing wrong with the way you’re doing it, or @KyleBanks solution (escaping the double quotes). Given php provides single and double quote string definitions, I prefer the first. But its up to your preference, or your dev team.

    As far as extracting the substring within the string quotes.. it depends on what they’re there for in the first place.

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

Sidebar

Related Questions

I have an issue going on here. I am using PHP to get values
Having an issue here that I have tried everything I can think of but
I'm seeing basically the same issue described here I have a table that starts
Here's the issue: I have a hook in IE that reacts on WebBrowser.OnNavigateComplete2 event
Here's the issue: I have 2 data contexts that I would like to do
I'm running a weird issue here. I have code that makes jquery ajax calls
i have done drag and drop using with jquery. here i have issue that
I have some issue here which I don't know how to solve in a
Greetings! I have an issue here that i can't find. I am getting a
I have a bit of an issue here. I have a Python script which

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.