Loop array question

I’m having a problem here. I have 2 dynamic arrays (which for the times being I hard coded values to).


split_location = new Array ('ShopCartID', 'FirstName', 'LastName');
total_split_text = new Array ('test31234567', 'Dave', 'Collier', 'test31234567', 'Angela', 'Ponte');

What I need to do is dynamically build a SQL statement that will insert total_split_text into the total_split_location.

The final output should be the following


Insert Into MailingList (ShopCartID,FirstName,LastName,) Values (test31234567,Dave,Collier,);Insert Into MailingList (ShopCartID,FirstName,LastName,) Values (test31234567,Angela,Ponte,)

Don’t worry about the extra comma’s etc - that’s easy enough to get rid of

The current loop I am working with is


for (i = 0; i < split_location.length; i++) {
    column += split_location* + ",";
    row += total_split_text* + ",";
}

The output is


Insert Into MailingList (ShopCartID,FirstName,LastName,) Values (test31234567,Dave,Collier,)

No matter what I do I can’t get the desired output - I can get duplicate outputs of either


Insert Into MailingList (ShopCartID,FirstName,LastName,) Values (test31234567,Dave,Collier,);Insert Into MailingList (ShopCartID,FirstName,LastName,) Values (test31234567,Dave,Collier,)

Or


Insert Into MailingList (ShopCartID,FirstName,LastName,) Values (test31234567,Angela,Ponte,);Insert Into MailingList (ShopCartID,FirstName,LastName,) Values (test31234567,Angela,Ponte,)

Any help is highly appreciated.

-D