title: Strip slashes on json array PHP
body: <p>I have json string: <code>$json = '{ "comment" : "I don\'t like" }';</code></p>
  
  <pre><code>$json_array = json_decode($json, true); // decode as array rather than object
  </code></pre>
  
  <p>Now the backslash before the single code mess up here:</p>
  
  <pre><code>foreach($json_array as $key =&gt; $value)
      {
          echo $value;
      }
  </code></pre>
  
  <p>so i tried this before <code>foreach</code> and decode:</p>
  
  <pre><code>$json = stripslashes($json);
  </code></pre>
  
  <p>But still gives an error:</p>
  
  <blockquote>
    <p>Error: Invalid argument supplied for foreach()</p>
  </blockquote>