I'm having following data:
Array ( [one] => this [two] => this2 )
Which I want to convert to json type which looks like:
data:{[one,this],[two,this2]}
How can I get through this in effecient manner?
Edit: I've tried a lot of things This is actual data which I need to make datatable compatible:
{"draw":0,"recordsTotal":null,"recordsFiltered":null,"data":[[{"first":[""],"second":[""],"third":[""],"fourth":[""],"fifth":[""],"sixth":["value"]}]]}
as the data here is in key=>value form json is not compatible for datatables (PHP)