我如何在视图中合并两个数组并插入数据库 - Codeigniter



Hellow 伙计们,我是这个平台的新成员......

我使用代码点火器框架,我的观点有两个不同的数组。第一个数组包含来自名为 customerData 的表单输入的数据,

customerData = {    customerid : customerid,
                    customername : customername,
                    address : address,
                    city : city,
                    phone : phone
                };

第二个是包含动态生成的 html 表中数据的数组,称为 tableData。

如何使用 Ajax Jquery 组合这两个数组并将它们发送到不同的表?

第二个表的数据是什么样的?

Javascript允许你合并两个数组:

var hege = ["Cecilie", "Lone"];
var stale = ["Emil", "Tobias", "Linus"];
var children = hege.concat(stale);

最新更新