How to get result from another column of array?
How to get result from another column of array?

It's possible to get two column values in one array?
for example, I want to get the "order_id" and the "status" in one array:
$table = 'order_client_view';
$primaryKey = 'id_order';
$columns = array(
array( 'db' => 'id_order', 'dt' => 0 ),
array( 'db' => 'id_client', 'dt' => 1 ),
array( 'db' => utf8_encode('client_name'), 'dt' => 2 ),
array(
'db' => 'status',
'dt' => 3,
'formatter' => function( $d, $row ) {
if($d == 0){
$selecao = '<form method="post" action="?pagina=update_status">';
$selecao .= '<input type="hidden" name="id_order" value="'.HERE I WANT TO PUT THE id_order.'">';
$selecao .= '<select style="font-size:10px;" onchange="this.form.submit();" name="status_select">';
$selecao .= '<option value="0">New Order</option>';
$selecao .= '<option value="1">Preparing</option>';
$selecao .= '<option value="2">Delivering</option>';
$selecao .= '<option value="3">Finished</option>';
$selecao .= '</select>';
$selecao .= '</form>';
}
}
)
);
In the array[3], the $d inside the function is the status code,
I want to put the id_order that is in the array[0].
Is it possible?
Thanks.
This discussion has been closed.
Answers
You can use a rendering function on the client-side to combine two data values into a single column for display in the table.
Allan
Thank you Allan,
I used another solution to solve this problem, in the server side.
I will let the solution here, because it can be the solution for someone's problem: