I have one array contains the result set from dynamically generated text box values.
In the below example I created three dynamically generated rows and each row contains 6 text field. For differentiate each row name i added the row id as the last word of name. Example ClaimExecutionCountry1
means ClaimExecutionCountry
as the name and 1
is the row id.
Array
(
[0] => ClaimExecutionCountry1=10
[1] => activitystartdate1=05-27-2016
[2] => activityenddate1=06-24-2016
[3] => CLCode1=CLC1
[4] => SCSCode1=SCS1
[5] => fileName1=calc2.png
[6] => ClaimExecutionCountry2=53
[7] => activitystartdate2=05-27-2016
[8] => activityenddate2=05-28-2016
[9] => CLCode2=
[10] => SCSCode2=
[11] => fileName2=gh.png
[12] => ClaimExecutionCountry3=82
[13] => activitystartdate3=05-26-2016
[14] => activityenddate3=07-28-2016
[15] => CLCode3=
[16] => SCSCode3=SCS5
[17] => fileName3=preview1.png
)
I am facing one issue for storing these values in Database. In my database structure is below
Id | ClaimExecutionCountry | activitystartdate | activityenddate | CLCode | SCSCode | fileName
I need to store after =
symbol values in this table.
after insert the table, the result would be
Id | ClaimExecutionCountry | activitystartdate | activityenddate | CLCode | SCSCode | fileName
------------------------------------------------------------------------------------------------------------
1 | 10 | 05-27-2016 | 06-24-2016 | CLC1 | SCS1 | calc2.png
2 | 53 | 05-27-2016 | 05-28-2016 | null | null | gh.png
3 | 82 | 05-26-2016 | 07-28-2016 | null | SCS5 | preview1.png
So Anyone please help me to store the array values in database using above format. I think you understood my problem. I am using PHP,codignator and MySql as database. Thanks in advance