how to get value from array columns data on Datatable to variable on php
how to get value from array columns data on Datatable to variable on php
erandra
Posts: 5Questions: 1Answers: 0
how get value data to variabel test in php?
{
'data': 'KPNO_TRANSAKSI',
'className': "center",
'render': function (data){
'<?php $test ?>' = data; // i want get value data to variabel test
return '<?php echo $test ?>';
}
}
]
});
This discussion has been closed.
Answers
It looks like you are mixing PHP and Javascript there. There PHP will only run at the server-side - not the client-side.
To be honest I'm not sure what you are actually trying to achieve with that code. Could you explain it to me please?
Thanks,
Allan
yes, i try to mixing.
i want make some button
i just want get value from KPNO_TRANSAKSI for make condition to decide btn-success or btn-danger. so, how can i do it if i'm not mixing it.
Here is an example for using
columns.render
to build buttons.http://live.datatables.net/qemodapi/1/edit
The
data
parameter will have the column value which isKPNO_TRANSAKSI
. You can use Javascript to for the condition.Kevin
This is my php code,
this is my dataTable code
i want make condition like on php code for button. and the condition get from database.
Please Help.
Thanks