I'm trying to make an Ajax query with an array in the parameters. Here's an example :
var info = [ter,ter,ter];
$('body').on('click','#upload', function(){
$.ajax({
url:'/app_dev.php/uploader_photos',
data:{
links : info,
},
dataType : 'json',
beforeSend : function(){
$('#upload_photo').empty();
$('#upload_photo').append('<i class="fa fa-refresh fa-spin"></i> Loading');
},
success : function(data){
$('#upload_photo').empty();
$('#upload_photo').append('<i class="fa fa-thumbs-o-up"></i> OK');
}
});
});
The issue is my url is encoded this way :
/upload?links%5B%5D=ter&lioks%5B%5D=ter&lioks%5B%5D=ter
What i need to know how to encode it this way :
/upload?links=[ter,ter,ter]
Thanks for the help !