sending php array through jquery
I have the following code, and would like to send it to a page for validation.
data: "submit=1&elements=$_POST['elements']"
Is this the right way to send a php array?
I also have this defined before the .ajax:
var $_POST = <?php echo json_encode($_POST); ?>;