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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:26:20+00:00 2026-05-30T01:26:20+00:00

My PHPstorm is throwing a wobbly with the formats of an array. Surprsingly I’ve

  • 0

My PHPstorm is throwing a wobbly with the formats of an array. Surprsingly I’ve found no direct answer to how to have this array formatted. I’ve tried the following, I’m surprised the single quotes don’t work and then the other two but no luck…

$array = array(’$2,000,000’,’$3,000,000’,’$4,000,000’);
$array = array("$2,000,000","$3,000,000","$4,000,000");
$array = array("\$2,000,000","\$3,000,000","\$4,000,000");

The manual doesn’t have commas as escapable. Given that the array is for HTML ouput only I could put

$array = array("&#362&#44000&#44000","&#36$3&#44000&#44000","&#364&#44000&#44000");

but i want to LEARN HOW TO DO IT properly!

  • 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-30T01:26:23+00:00Added an answer on May 30, 2026 at 1:26 am

    The single quotes don’t work because what you have here are NOT single quotes, but rather curly apostrophes:

    // Incorrect - not real single quotes:
    $array = array(’$2,000,000’,’$3,000,000’,’$4,000,000’);
    
    // Correct single quotes:
    $array = array('$2,000,000','$3,000,000','$4,000,000');
    

    Assuming you may have copy/pasted this from somewhere, always beware curly quotes when working with code. Some CMS’ and frameworks will convert them for display purposes, but doing so breaks the code for copy/pasters.

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

Sidebar

Related Questions

I have PHPStorm 2.1.5. It could be that you encountered this, if so please
I have a git repo hooked up in phpstorm on windows. I committed a
In Netbeans and phpStorm, this works as expected: public function someMethod() { $objectA =
I have the following snippet of code. abstract class MrParent { public function __construct()
I have used XDebug semi-sucessfully with PhpStorm and Mamp, but now I want to
I'm new to PhpStorm. I have PHPstorm 3.0 the latest version. In the netbeans
I'm trying out PhpStorm, but I'm having problem with the autocomplete of Request object
I am using PHPStorm IDE, and it has a very useful feature, inspect the
How to make phpstorm display line numbers by default? Couldn't find that option. It's
my question is not about RegEx in general but about PhpStorm's search-replace-functionality with RegEx

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.