PHPから配列を返す必要がありますが、正常に出力すると、undefinedと表示されます。配列の値を取得するにはどうすればよいですか?
$.ajax({
type: "POST",
url: "test2.php",
data : {
price : [101, 69, 51],
id : [1, 2, 3]
},
success: function(response) {
alert response[0];
}
})
// PHP
echo $_REQUEST["price"];