Q:

Get particular values in php from ajax serialize

Have input form with input fields and selectors. Want values from input fields and selector values with ajax to pass to php file and process in php file particular values
Part of html is like this
<select name="record_date_selector[]" ...

<input type="text" name="record_date[]" ...

ajax is like this
var values = $("form").serialize();
$.ajax({
type: 'POST',
url: '__popup-window_ajax.php',
data: { 'clickedId' : $(this).closest('td').attr('id'), 'Values' : values },
dataType: 'json',
});

With php
echo json_encode($_POST['Values']);

get something like this
record_date_selector%5B%5D=3&record_date%5B%5D=02.07.2013
How can I get value of for example record_date_selector?
Tried echo json_encode($_POST['record_date_selector']); But this way is not correct
Please advice

A:

You can use this in your php file:
<?php
// Get 'Values' value and store as array in $output 
parse_str($_POST['Values'],$output);
// convert $output in json
 echo json_encode($output);
?>

and Get value from ajax response like this
response.your_input_name; //response.record_date_selector

