How to insert data from multiple array to database PHP&MYSQL?
I have created one table name is student. There are 3 fields ID,Name and Sex.
Example: Array ( [0] => 1,Jam,M [1] => 2,Janny,F [2] => 3,Vary ).
Table students there 3 fields ID,NAME,SEX.
How to insert multiple array into Table students?
You should try doing a foreach loop, like this:
I noticed your third element does not contain sex, so you should check for validity in case it’s needed.