Pass array in jQuery ajax
<p>My imaginery code:</p>

<pre><code>$(document).ready(function() {
    $("#sub").click(function() {
        info['moto']  = $("#moto").val();
        info['motox'] = $("#motox").val();

        $.ajax({
            type: "POST",
            url: "index.php",
            data: "arr="+info,
            success: function(msg){
                $('.answer').html(msg);
            }
        })
    })
})
</code></pre>

<p>How could I make, that after receiving it in .php file I could use POST method like this: <code>$_POST['moto']</code> and <code>$_POST['motox']</code> or something like that? What should I change? Thanks.</p>
