I have an associate array that if grouped would create 18 sets of data that I need inserted into my db.
Here is a snippet of the array. These are $_POST variable that have been sorted.
$items = array("h1" => 3,"i1" => 10019,"f1" => "Y","h2" => 3,"i2" => 10020,"f2" => "N",etc..,);
I need to take this array and add the values to my INSERT statement.
ex:
INSERT INTO tblDetails (hole_id,rp_id,hd_score,hd_fairway_hit) VALUES (i1,$rp_id,h1,f1),(i1,$rp_id,h1,f1), etc...
*note $rp_id is a variable outside the array that is the same for each of the 18 recordsets.
How do I achieve this?
Thx in advance,
Alex