Is there a PHP configuration that will automatically escape double quotes?
<p>I'm wondering if anyone knows of a PHP setting that will automatically escape double quotes.</p>

<p>My issue is that on my local server, i'm posting this string to the server:</p>

<pre><code>{"0":{"id":"19","goal":"34"},"1":{"id":"22","goal":"657675"},"2":{"id":"21","goal":"456"}}
</code></pre>

<p>and it works fine. However, on the production server, I post the same string, and when I echo it out it is changed to:</p>

<pre><code>{\"0\":{\"id\":\"19\",\"goal\":\"34\"},\"1\":{\"id\":\"22\",\"goal\":\"657675\"},\"2\":{\"id\":\"21\",\"goal\":\"456\"}}
</code></pre>

<p>I managed to fix it with a string_replace() call, but I would like to know why this is happening. The production server and local server are using the same code and were updated to use the same data, so I'm assuming the discrepency must be caused by server settings, but I have never heard of a setting that does that. </p>

<p>Has anyone experienced something like this?</p>
