How to get array data passed by .post in jquery into php?
<p>I have a problem regarding on how to get the value of the array variable passed by <code>.post</code> in jquery into my php page</p>

<p>this is my jquery code:</p>

<pre><code>minDate = [];
hoursWork = [];
empId = [];
        $('.minDate').each(function() { 
            minDate.push($(this).val());
        });

        $('.hoursWork').each(function() { 
            hoursWork.push($(this).val());
        });

        $('.empId').each(function() { 
            empId.push($(this).val());
        });

            $.post('rtInsert.php', { minDate: minDate, hoursWork: hoursWork, empId: empId }, function(data) { 
        alert(data);
    });
</code></pre>

<p>How can I get the passed data in my <code>rtInsert.php</code></p>

<p>i tried </p>

<pre><code>$minDate = $_POST['minDate'];
$empId = $_POST['empId'];
$workHours = $_POST['hoursWork'];
</code></pre>

<p>now how will i get the individual value of the array because all the 3 variables is an array</p>

<p>All I know is a single array using <code>foreach()</code> but
what if there are 3 arrays passed</p>

<p>Is there any idea how I can get it or how can I passed into single array.</p>

<p>Thanks in Advance.</p>
