JSON stringify and decode JS/PHP
<p>I have a problem with sending an object in PHP. I stringify the object before sending it to the PHP file.</p>

<p>The PHP file then uses json_decode. But the decode shows a blank variable.</p>

<p>The object which i console.log shows this as its structure:</p>

<p><img src="http://i.stack.imgur.com/Qf8gt.jpg" alt="enter image description here"></p>

<p>Its then sent to PHP with this :</p>

<pre><code>    console.log(my_Obj);
    var as = JSON.stringify(my_Obj);        
    call_data('add.php?&amp;as='+as, nxtFunc);  
</code></pre>

<p>Now in the PHP file i have this which handles the situation:</p>

<pre><code>    $path = json_decode($_GET['as']);
    echo $_GET['as'].'&lt;br/&gt;';
    print_r($path);
    die;
</code></pre>

<p>The result is:</p>

<pre><code>[null,null,{\"8\":[null,null,null,null,null,null,[],[],[],[],[]],\"9\":
[null,null,null,null,null,null,null,null,null,null,[]],\"10\":
[null,null,null,null,null,null,null,null,null,null,[],[]],\"11\":
[null,null,null,null,null,null,null,null,null,null,null,[]]}]   
&lt;br/&gt;
</code></pre>

<p>My XHR request url in Chrome shows:</p>

<pre><code>add.php?as=[null,null,{%228%22:[null,null,null,null,null,null,[],[],[],[],[]],%229%22:[null,null,null,null,null,null,null,null,null,null,[]],%2210%22:[null,null,null,null,null,null,null,null,null,null,[],[]],%2211%22:[null,null,null,null,null,null,null,null,null,null,null,[]]}]
</code></pre>

<p>Notice the print_r shows nothing. Should i not be using stringify ?</p>
