PHP read Javascript array
<p>I am passing an array from Javascript to PHP page, as below.</p>

<pre><code>var arrF1 = [{"Item":"item1no",
      "Desc":"item1desc",
      "Remarks":"item1note"},
             {"Item":"item2no",
      "Desc":"item2desc",
      "Remarks":"item2note"}
    ];
$.ajax({        
   type: "POST",
   url: "http://www.mydomain.com/pdfs/flist.php",
   data: { favArray : arrF1 },
   success: function() {
        alert('ok, sent');
   }
}); 
</code></pre>

<p>In my PHP page, I read the array as below.</p>

<pre><code>$fArray = json_decode($_POST['favArray'])
</code></pre>

<p>And I tried to access the arrays value like this.</p>

<pre><code>$fArrav[0]-&gt;{'Item'}
$fArrav[0]-&gt;{'Desc'}
$fArrav[1]-&gt;{'Item'}
</code></pre>

<p>Is this correct?
I am generating a PDF on the server using FPDF.
But with the above, its not reading the array.</p>

<p>I must not be doing this right.
Please help.</p>

<p>Thank you.</p>
