i would like to add a if/else statement which depends on a php session variable. For example the user has a session variable with id=1. If this is the case the jquery table should only load the data from data1. Is this somehow possible?
The Table is from here: https://datatables.net/examples/api/row_details.html
$(document).ready(function() {
var table = $("#example").DataTable({
"lengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
X if statement should be here X
"data": detailed.data1, /// or /// "data": detailed.data2
var detailed = {
"data1" = [ *someinfo* ]
"data2" = [ *someinfo* ]
}