Question: I am adding value that start with `$` symbol in sql where clause. I execute the query in php.

**worked** - when wrap `$n` in double quote and whole query in single quote

```
$query= 'SELECT * FROM a
          WHERE n="$n" '

```

**not worked** - wrap `$n` in single quote and whole query in double quote

```
$query= "SELECT * FROM a
          WHERE n='$n' "

```

Why is it so?
Thanks in advance.

Answer: 
Check out this updated sandbox <https://codesandbox.io/s/sad-wildflower-ek8ed>
```
import React from "react";

const ItemDetailViewer = props => {
  const { data } = props;
  return (
    <div className={"container"}>
      {data.map((detail, index) => (
        <table key={index}>
          {Object.keys(detail).map((key, index) => (
            <div className={"records"}>
              <span>{key}</span>
              <span>:{detail[key]}</span>
            </div>
          ))}
        </table>
      ))}
    </div>
  );
};
export default ItemDetailViewer;

```

styles.css

```
.App {
  font-family: sans-serif;
  text-align: center;
}

.records {
  display: flex;
  width: 300px;
}

table {
  border-width: 1px;
  border-style: solid;
  margin-right: 1em;
}

.container {
  display: flex;
}

```

Screenshot of the exact output you want

[![enter image description here](https://i.stack.imgur.com/ATX2D.png)](https://i.stack.imgur.com/ATX2D.png)
This should get you as many no of tables as the number of objects you have in the array.

I have modified the sandbox, check it if this is what you want <https://codesandbox.io/s/sad-wildflower-ek8ed>