rf9
07-17-2008, 01:55 PM
Hi all,
I've got an array of data and I need to figure out how to deal with it and insert it into a database. The array looks like this:
array(2) {
[0]=> array(3) {
["labelName"]=> string(9) "First name"
["inputType"]=> string(22) "textfield"
["validate"]=> string(7) "no" }
[1]=> array(3) {
["labelName"]=> string(9) "Last name"
["inputType"]=> string(28) "textfield"
["validate"]=> string(7) "no" } }
So the array above would create 2 rows in a database. I have dealt with arrays before but this one is a little more complex to me. I guess some kind of loop will be needed to get the values and then pass them to an insert query. Any advice much appreciated.
Many thanks in advance.
I've got an array of data and I need to figure out how to deal with it and insert it into a database. The array looks like this:
array(2) {
[0]=> array(3) {
["labelName"]=> string(9) "First name"
["inputType"]=> string(22) "textfield"
["validate"]=> string(7) "no" }
[1]=> array(3) {
["labelName"]=> string(9) "Last name"
["inputType"]=> string(28) "textfield"
["validate"]=> string(7) "no" } }
So the array above would create 2 rows in a database. I have dealt with arrays before but this one is a little more complex to me. I guess some kind of loop will be needed to get the values and then pass them to an insert query. Any advice much appreciated.
Many thanks in advance.