title: explode and then insert to table
body: <p>I'm just confused with how to explode the string to insert into the database individually.</p>
  
  <p>My code:</p>
  
  <pre><code>$mymotives = "Entrega de Documentos, Orientacion, Username y Password, Convalidacion";          
  $ExplodeMotives = explode(", ", $mymotives);
  foreach ($ExplodeMotives as  $value) {
      $queryAdd = "INSERT INTO StuSelectCateg (attendedBy, personName, personLast, depName, categoryName, timeOut) 
                   VALUES ('".$_SESSION["nomEmpleado"]. " " . $_SESSION["appEmpleado"]."', '".$_SESSION['estNombre']."', '".$_SESSION['estApellido']."', '".$_SESSION['concentracion']."', '$value', '$stuTOut')";
      mysqli_query($con, $queryAdd);
  }
  </code></pre>
  
  <p>I want my output to be in my database like this </p>
  
  <pre><code>Table | Category
  -----------------------------
  1     | Entrega de Documentos
  2     | Username y Password
  3     | Convalidacion
  </code></pre>