Hi,
Thanks for this.
So i have made some changes and have used serialise.
I have three things to import per line, the first is an ID and should be the same on every line.
The second is the value of a hidden input which will be different per line.
The third is the value of a text box which may be different on each line.
I do not want to include rows where the number in the input is zero or blank.
I have this
$jobId = $_SESSION['current_job_id'];
$equipmentId = serialize($_POST['equipmentId']);
$equipmentQty = serialize($_POST['equipmentQty']);
$sql = "INSERT INTO ssm_equipment_order (job_id, equipment_id, equipment_quantity) VALUES ('$jobId', '$equipmentId', '$equipmentQty')";
but when printing $sql i get the following
INSERT INTO ssm_equipment_order (job_id, equipment_id, equipment_quantity) VALUES ('25', 'a:22:{i:0;s:1:"2";i:1;s:1:"1";i:2;s:1:"3";i:3;s:1:"4";i:4;s:1:"5";i:5;s:1:"6";i:6;s:1:"7";i:7;s:1:"8";i:8;s:1:"9";i:9;s:2:"10";i:10;s:2:"11";i:11;s:2:"12";i:12;s:2:"13";i:13;s:2:"14";i:14;s:2:"15";i:15;s:2:"16";i:16;s:2:"17";i:17;s:2:"18";i:18;s:2:"19";i:19;s:2:"20";i:20;s:2:"21";i:21;s:2:"22";}', 'a:22:{i:0;s:2:"10";i:1;s:2:"10";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";i:7;s:0:"";i:8;s:0:"";i:9;s:0:"";i:10;s:0:"";i:11;s:0:"";i:12;s:0:"";i:13;s:0:"";i:14;s:0:"";i:15;s:0:"";i:16;s:0:"";i:17;s:0:"";i:18;s:0:"";i:19;s:0:"";i:20;s:0:"";i:21;s:0:"";}')
So i feel like i am on the right lines and will keep looking. One thing i am not sure on is how to only include in the array rows where the equipmentQty is not 0 or blank.