I know it is possible to split an array to be inserted to multiple columns/rows but I just stumped.
Say we have something like this….
Array
(
[john] => blue
[lee] => red
[sylva] => green
[paul] => black
)
In my table, I have three columns namely id,name,color. How can I insert these elements so that the rows in my table are incremented (based on this array, it should be 4 rows altogether)..
Thanks.
If you mean you want to insert the arrays into database tables, then:
Do you mean something like this..