且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从codeigniter一个函数返回多个阵列?

更新时间:2023-08-19 19:49:22

从code,我不知道是什么导致你通过组合数据是在$数据,$ data1和$ data2的期望。

From your code, I don't know what result you expect by combining all data which is in $data, $data1 and $data2.

但你可以尝试 array_merge(数组1,数组2,ARRAY3 ...)的功能,如果你想要的所有数据,其中重点从0开始,并以1为每个值增加。

but you can try array_merge(array1,array2,array3...) function if you want all data where key starting from 0 and increases by 1 for each value.

否则,您可以创建包含所有数据值另一个数组,

Or else you can create another array with all data values like,

返回阵列(数据=> $的数据,数据1=> $数据1,数据2=> $数据2)

通过这种方式可以实现你想要的。

by this way you can achieve what you want.