Sending an array to a function in codeigniter
<p>I have the following codes which sends an array to the function /chat in codeigniter</p>

<pre><code>$(document).ready(function () {
    $('#submit').live('click', function (eve) {
        eve.preventDefault();
        $.ajax({
            url: "http://localhost/fq/index.php/splash/chat/",
            type: 'JSON',
            data: a,
            success: function (html) {
                alert(html);
            }
        });
    });
</code></pre>

<p>Let us assume that array a contains names of people only. ( John, James, Smith) </p>

<p>I want to be able to retrieve the all the values from the array in the function chat. </p>

<p>How can it be done? </p>

<p>Edit: </p>

<p>I need to retrieve the values from the JSON encoded array in this function (codeigniter) </p>

<pre><code>   public function chat()
{


  //code to retrieve values

  $this-&gt;load-&gt;view('chat');

}
</code></pre>
