I think you need to save data with json_encode() value.
// In your controller
public function test() {
if($this->request->is('post')) {
//If you want to insert in single row then you can use json_encode() and add to your colum.
$insert_data = json_encode($this->request->data);
$data = array();
// Load your model where you want save data
$this->loadModel('Test');
// set attribute name where you want to save
$data['Test']['value'] = $insert_data;
$this->Test->save($data);
//For viewing your data
$fetchedData = $this->Test->find('all');
foreach($fetchedData as $items) {
var_dump(json_decode($items['Test']['value']));
}
}
}
You can use implode() to generate comma separated data. If you want to use implode(), look at Inserting an array into a mysql database column
json_encode($this->request->data['Model'])and then you can easilyjson_decode($value, true);it back when you need.