I am trying to finish the last function of a script that sync data
added in Facebook
lead form to MySQL database
. I am trying to map
MySQL columns to Facebook
lead form fields then when new entry
added in Facebook lead each content to be added to MySQL column as rows depending on mapping
chosen in script setting page
.
I have now 2 arrays
1. The first one $mapfieldarray contain key ==> value
where
- key
is MySQL columns
and
- value
is the Facebook fields
I map to the columns
Array
(
[key] => phone_number_col
[values] => phone_number
)
(
[key] => full_name_col
[values] => full_name
)
2. and the second array is $leadField contain name ==> value
- where name
is Facebook field
that has value entered and
- value
which return field entry value
.
Array
( [name] => phone_number
[values] => Array
(
[0] => <test lead: dummy data for phone_number>
)
) (
[name] => full_name
[values] => Array
(
[0] => <test lead: dummy data for full_name>
)
)
how to get this done ?