title: multiple foreach loops for different variables?
body: <pre><code>foreach ($textAr as $BachelorsDegrees)
  {
  foreach ($textArCert as $Certifications)
  {
  foreach ($textArDip as $Diplomas)
  {
  foreach ($textArAD as $AssociateDegrees)
  {
  foreach ($textArMD as $MastersDegrees)
  {
  foreach ($textArDD as $DoctorateDegrees)
  {
  foreach ($textArSD as $SpecialDegreePrograms)
  {
  </code></pre>
  
  <p>what would be the best way to make the above code work (it's just a snippet of the entire code)?  Each variable, for example $BachelorsDegrees, is a textarea box in the HTML form.  I am trying to insert values from each textarea box into the database in individual rows.  I got it working for one textarea box, but how to make it work for multiple textarea boxes?</p>
  
  <p>Was thinking of doing an if else statement and an INSERT and UPDATE sql statement so that when one foreach loop worked, it would INSERT data into the database, then the loop would stop, then an else statement would go for the next foreach loop and an UPDATE query would update the next column for the same product instead of inserting.  If I did multiple INSERT queries, I would be creating more rows for each variable, which I don't want.  More rows for the values on each variable, but not rows for the actual variable.  Each variable represents a column.</p>
  
  <p>For example,</p>
  
  <p>When the values from the BachelorsDegrees textarea get inserted into its column, the next loop will run (Certifications) into the next column.  So I was thinking an UPDATE query would be effective.  That way I don't have NULLS in every column.</p>