title: Remove double quotes from json encoded string using php for dhtmlxscheduler
body: <p>I need some help with JSON and jquery.</p>
  
  <p>I developing application with dhtmlx scheduler. I want to create dhtmlx sections dynamically. </p>
  
  <p>I generating json_encoded string using php json_encode function given in following </p>
  
  <pre><code>["{key:23, label:'T23 (34)'}","{key:24, label:'T24 (34)'}","{key:26, label:'T26 (26)'}","{key:35, label:'T35 (25)'}"]
  </code></pre>
  
  <p>Ajax call function for this </p>
  
  <pre><code>$.ajax({
              url:"updatetablestr.php",
              type:"get",
              data:{id:id},
              dataType: 'json',
              beforeSend:function(){},
              success:function(q)
              {
              var JSONString = JSON.stringify(q);
              var output=JSONString.replace(/\"/g,"");                
              scheduler.updateCollection("MyList",output);
              }
              })
  </code></pre>
  
  <p>PHP function is,</p>
  
  <pre><code>$resarray=json_encode($array);
  echo preg_replace('/"([a-zA-Z]+[a-zA-Z0-9_]*)":/', '$1:', $resarray);
  </code></pre>
  
  <p>i removed first and last quotes using jquery</p>
  
  <pre><code>var JSONString = JSON.stringify(q);
  var output =JSONString.replace(/\"/g,"");
  </code></pre>
  
  <p>after this jquery code i could get my output </p>
  
  <pre><code>[{key:23, label:'T23 (34)'}","{key:24, label:'T24 (34)'}","{key:26, label:'T26 (26)'}","{key:35, label:'T35 (25)'}]
  </code></pre>
  
  <p>This output is what i need. when i use static code like </p>
  
  <pre><code> var output= [{key:23, label:'T23 (34)'}","{key:24, label:'T24 (34)'}","{key:26, label:'T26 (26)'}","{key:35, label:'T35 (25)'}]
  </code></pre>
  
  <p>is working . When i implement dynamically which generated php , JSON.stringify is not working..
  that time its showing the following error </p>
  
  <pre><code>scheduler.updateCollection("MyList",output);
  </code></pre>
  
  <p><strong>"Uncaught TypeError: Function.prototype.apply: Arguments list has wrong type"</strong> 
  in dhtmlxschduler.js</p>
  
  <p>While statically working with same string why it's not working when dynamically generated using php and jquery..</p>