receive array in php

0

I need to take an array to php to be able to insert it into a table that is in mysql

Since Javascript I'm sending it like this

var table = $('#tblGrid').tableToJSON({
            ignoreColumns: [5]
        });
        JSON.stringify(table)
        table.splice(0, 1);
        var newParametros = table;
        $.ajax({
            url: "sendTophp/insertarParametros.php",
            data: { newParametros: newParametros },
            type: "POST",
            success: function (param) {
            },
            error: function (err) {
                alert("Ha ocurrido al consultar los parametros.")
                console.log(err.responseText)
            }
        });

But I do not know how to receive it in php to be able to insert it into a table.

someone can help me by indicating how I can pass it to php

    
asked by Eduard 13.09.2018 в 14:43
source

1 answer

2

You receive it in PHP as well:

$newParametros = $_POST['newParametros'];

Try and tell us

    
answered by 13.09.2018 / 16:40
source