I have the following code
<a style="cursor: pointer;" onclick="verMatch2(this,'<?php echo base64_encode($datosSolicitud['id']);?>','<?php print_r($datosSolicitud); ?>');">
I want to pass $datosSolicitud
which is an array to a js file
function verMatch2(elemento,solicitudEmpleo,datosSolicitud){
$("tr.tmp").remove();
tmp = $(elemento); fila = tmp.closest('tr');
$.ajax({
data: {solicitudEmpleo : solicitudEmpleo,datosSolicitud : datosSolicitud},
url: 'index.php?accion=verMatch2',
type: 'post',
success: function (data) {
fila.after("<tr class='tmp'><td colspan='6'>"+data+"</td></tr>");
$(".loader").fadeOut("fast");
$('.selectpicker').selectpicker(parametros);
},
});
}
then receive it in the controller but how do I send it? if it was not fix I use echo to print it in the javascript function.