How do you show double quotes in single quotes PHP

Solution:

he keyword you miss is “escaping” (seeĀ Wiki). Simplest example:

echo "\"";

would output:

"

EDIT

Basic explanation is – if you want to put double quote in double quote terminated string you MUST escape it, otherwise you got the syntax error.

Example:

echo "foo"bar";
         ^
         +- this terminates your string at that position so remaining bar"
            causes syntax error. 

To avoid, you need to escape your double quote:

echo "foo\"bar";
         ^
         +- this means the NEXT character should be processed AS IS, w/o applying
            any special meaning to it, even if it normally has such. But now, it is
            stripped out of its power and it is just bare double quote.

So your (it’s part of the string, but you should get the point and do the rest yourself):

 echo "stores[".$row['BarID']."] = [". $row['BarName'] . ", " . $row['Address'] .

should be:

 echo "stores[".$row['BarID']."] = [\"". $row['BarName'] . "\", \"" . $row['Address']. "\"

and so on.