I have array in php like:
if ($_GET['id1'] == "machine-category") {
$table['cols'] = array(
array('label' => 'category', 'type' => 'string'),
array('label' => 'count', 'type' => 'string')
);
}
I want to pass various value in category, tried:
if ($_GET['id1'] == "machine-category") {
$table['cols'] = array(
array("'".
"label".
"'".
" => . ".
"'".explode($GET['id1'], "-")[1].
"', '".
"type'".
" => '".
"string".
"'"),
array('label' => 'count', 'type' => 'string')
);
}
but it doesn't work.
Can anyone provide the solution for same?