title: Replace double quotes with single quotes in json string in php
body: <p>I have a json string which contains some html and it's attrubutes. I'm trying to to escape or replace double quotes with single quotes in this string. my code works with some html attributes but not with all.<br><br>
  My example:</p>
  
  <pre><code>$json='{"en":"&lt;b class="test" size="5" &gt;Description&lt;/b&gt;"}';
  $json=preg_replace('/([^:,{])"([^:,}])/', "$1".'\''."$2",$json);
  echo htmlspecialchars($json);
  //ouput: {"en":"&lt;b class='test' size='5" &gt;Description&lt;/b&gt;"}
  </code></pre>
  
  <p><br>
  Needed result:</p>
  
  <pre><code>{"en":"&lt;b class='test' size='5' &gt;Description&lt;/b&gt;"}
  </code></pre>