Hello I have an array that looks like this,
Array
(
[cfi_title] => Mr
[cfi_firstname] => Firstname
[cfi_surname] => Lastname
[cfi_email] =>
[email protected]
[cfi_subscribe_promotional] =>
[cfi_tnc] =>
[friendsName] => Array
(
[0] => Firstname 1
[1] => Firstname 2
[2] => Firstname 3
)
[friendsEmail] => Array
(
[0] =>
[email protected]
[1] =>
[email protected]
[2] =>
[email protected]
)
[submit_form] => Submit
)
My dilema is I need to save the values from the friendsName and friendsEmail arrays into a database, I know I can loop through them but how can I send the matching data,
for example I need to save [friendsName][0] and friendsEmail][0] on the same row of database?
I know I need to use a foreach but I just cannot figure out the logic.