Tengo un formulario html. ¿Cómo puedo obtener una matriz para usarla en una función php? Tengo una función js que hace lo mismo. Pero, ¿cómo hacerlo en php? ¿Puedo de alguna manera pasar la matriz devuelta de js a php?
function getInputByMatrix() { const rows = document.getElementById('mrow').value; let input = []; for (let i = 1; i <= rows; i++) { input[i-1] = []; for (let j = 1; j <= rows; j++) { input[i-1][j-1] = document.getElementById(`a${i}${j}`).value; } } return input; }