我想从 add from 在 cakephp 中插入数据。我$this->request->data['ProductValue']
在控制器上输入了数组。我的数组是:
Array
(
[0] => Array
(
[title] => Deepak1
[value] => Option1
)
[1] => Array
(
[title] => Deepak2
[value] => Ans1, Ans2, Ans3, Ans4
)
[2] => Array
(
[title] => Deepak3
[value] => Product1
)
[3] => Array
(
[title] => Deepak4
[value] => Radio1
)
)
但我需要这种类型的数组:
Array
(
[0] => Array
(
[title] => Deepak1
[value] => Option1
)
[1] => Array
(
[title] => Deepak2
[value] => Array
(
[0] => Ans1
[1] => Ans2
[2] => Ans3
[3] => Ans4
)
)
[2] => Array
(
[title] => Deepak3
[value] => Product1
)
[3] => Array
(
[title] => Deepak4
[value] => Radio1
)
)
请告诉我如何做到这一点...