I have a array that I want to pass mediante un POST
(using $.post
of jQuery
):
var linkNamesList = []; // A este array se le añaden elementos al usar la web
function sendData() {
$.post('create_paste.php', {
"linkNames": linkNamesList, //ESTE ES EL ARRAY, PERO PARECE QUE ASÍ DIRECTO NO FUNCIONA
"name": title
},function(data) {
console.log('¡Hecho!', data);
});
}
When the array is read in PHP, I get an empty variable . I would like to do it without PHP, because with PHP I already know that there is serialize
, which will surely work.