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("Ūꯠꯠ","$$3ꯠꯠ","Ŭꯠꯠ");
but i want to LEARN HOW TO DO IT properly!
The single quotes don’t work because what you have here are NOT single quotes, but rather curly apostrophes:
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.