Hi, Thanks for the reply.
I need to put those fields in a mysql db, grouped by what number it is.
ie
product1, quantity1, color1 will go in its own row.
product4, quantity4, color4 will go in its own row, etc
so unless i am going about this wrong, I can use a foreach loop on the POST data
and and separate the name and number of those three to another array and assign the value, so
$productarray[1][product]=widget99;
$productarray[1][quantity]=34;
$productarray[1][color]=black;
$productarray[4][product]=widget2;
$productarray[4][quantity]=5;
$productarray[4][color]=red;
i could easily iterate through that and input into mysql.
so if that makes sense to do, how can i do something like
foreach ($_POST as $key => $value) {
// if 'product', 'quantity', or 'color' appears in $key , break it up into 2 strings
$productarray[string2][string1] = $value;
}
i am looking at explode and preg_split. maybe one will do what i need it to.
chuck