If I have an array like this:
Array ( [0] => "81" [1] => [2] => "NS" [3] => "60" [4] => "LAMP" [5] => [6] => )
How can I make this code:
$sql = "INSERT INTO linv_inventory (user_id,inventory_part_number,inventory_alt_part_number,".
"inventory_condition_code,inventory_quantity,inventory_description,".
"last_update) ".
"VALUES ($user_id, ".implode(',', $fields_order).", NOW())";
produce this SQL:
INSERT INTO linv_inventory (user_id,inventory_part_number,inventory_alt_part_number,
inventory_condition_code,inventory_quantity,
inventory_description,last_update)
VALUES (425, "81", "","NS","60","LAMP", NOW())
I can't seem to make element 1 = "" at all. I'm removing 5 and 6 using array_slice.