$matstring=implode("','",$matrix[1]); mysql_query('INSERT INTO Australia (Price, Company, Days, Weight) VALUES ('$matstring')');