title: array of text field can't send to php includes file
body: <p>I have an array of text fields (user interface) that created HTML, CSS, Javascript using inside of the user interfaces. </p>
  
  <p>The problem is when input elements that don't print or send the whole array. I want to print the whole array. It prints one array element.</p>
  
  <p>order.php (user interface):</p>
  
  <pre><code>    &lt;div class="row"&gt;               
              &lt;form id="ex_order" action="includes/exchange-order.inc.php" method="POST"&gt;
  
              &lt;div id="main_div" class="main_sec_div"&gt;
              &lt;div class="col-lg-12 col-ml-12"&gt;
                      &lt;button type="button" id="add" class="btn btn-primary"&gt;&lt;i class="fas fa-plus"&gt;&lt;/i&gt;&lt;/button&gt;
              &lt;/div&gt;
  
              &lt;div class="col-lg-12 col-ml-12 group"&gt;
                      &lt;div class="row" style="padding:0rem 1rem 1rem 1rem; padding-bottom:1.5rem; margin:2rem 0.2rem 2rem 0.2rem; background:#ccc;"&gt;
                              &lt;div class="col-12 mt-5" style="margin:-1rem;"&gt;
                                      &lt;span style="margin-left:1rem;" class="status-p bg-primary"&gt;Passanger #1&lt;/span&gt;
                              &lt;/div&gt;
                              &lt;!-- Add Ticket Information start --&gt;
                              &lt;div class="col-3 mt-5"&gt;
                                      &lt;div class="card"&gt;
                                              &lt;div class="card-body"&gt;
                                                      &lt;h4 class="header-title"&gt;Ticket Infromation&lt;/h4&gt;
                                                      &lt;p class="text-muted font-14 mb-4"&gt;Here are want to add &lt;code&gt;Ticket Infromation&lt;/code&gt; of Exchange Order.&lt;/p&gt;
                                                      &lt;div class="form-group"&gt;
                                                              &lt;label for="example-text-input" class="col-form-label"&gt;Passenger Name&lt;/label&gt;
                                                              &lt;input name="p_name[]" class="form-control" type="text" id="p_name" required&gt;
                                                      &lt;/div&gt;
                                                      &lt;div class="form-group"&gt;
                                                              &lt;label for="validationCustom03"&gt;Ticket No.&lt;/label&gt;
                                                              &lt;input name="ticket_no[]" type="text" class="form-control" id="ticket_no" required&gt;
                                                      &lt;/div&gt;
  
                                              &lt;/div&gt;
                                      &lt;/div&gt;
                              &lt;/div&gt;
                      &lt;/div&gt;
              &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;button type="submit" name="submitOrder" id="submitOrder" class="btn btn-primary mt-4 pr-4 pl-4"&gt;Save&lt;/button&gt;
  
  
  &lt;!-- Jquery --&gt;
  &lt;script&gt;
          $(document).ready(function() {
  
                  let i = 0;
                  let passCount = 1;
                  console.log('Default i : ', i);
  
                  // add button
                  $(document).on('click', '#add', function() {
                          i++;
                          console.log('Add', i);
                          html = `
                          &lt;div class="col-lg-12 col-ml-12 second-div" id="sec_div${i}"&gt;
                                  &lt;div class="row" style="padding:0rem 1rem 1rem 1rem; padding-bottom:1.5rem; margin:2rem 0.2rem 2rem 0.2rem; background:#ccc;"&gt;
                                          &lt;div class="col-12 mt-5" style="margin:-1rem; display:flex; height:60px; align-items:center; align-content:center; justify-content:space-between;"&gt;
                                                  &lt;div&gt;
                                                          &lt;span style="margin-left:1rem;" class="status-p bg-primary"&gt;Passanger #${++passCount}&lt;/span&gt;
                                                  &lt;/div&gt;
                                                  &lt;div&gt;
                                                          &lt;button style="margin:1rem 1rem 0 0;" type="button" name="remove" id="${i}" class="btn btn-danger btn-sm remove"&gt;&lt;i class="fa fa-close"&gt;&lt;/i&gt;&lt;/button&gt;
                                                  &lt;/div&gt;
                                          &lt;/div&gt;
  
                                          &lt;div class="col-3 mt-5"&gt;
                                                  &lt;div class="card"&gt;
                                                          &lt;div class="card-body"&gt;
                                                                  &lt;h4 class="header-title"&gt;Ticket Infromation&lt;/h4&gt;
                                                                  &lt;p class="text-muted font-14 mb-4"&gt;Here are want to add &lt;code&gt;Ticket Infromation&lt;/code&gt; of Exchange Order.&lt;/p&gt;
                                                                  &lt;div class="col-md-12 mb-3"&gt;
                                                                          &lt;label for="example-text-input" class="col-form-label"&gt;Passenger Name&lt;/label&gt;
                                                                          &lt;input name="p_name[]" class="form-control" type="text" id="p_name" required&gt;
                                                                  &lt;/div&gt;
                                                                  &lt;div class="col-md-12 mb-3"&gt;
                                                                          &lt;label for="validationCustom03"&gt;Ticket No.&lt;/label&gt;
                                                                          &lt;input name="ticket_no[]" type="text" class="form-control" id="ticket_no" required&gt;
                                                                  &lt;/div&gt;
                                                          &lt;/div&gt;
                                                  &lt;/div&gt;
                                          &lt;/div&gt;
                                  &lt;/div&gt;
                          &lt;/div&gt;`;
  
                          $('#main_div').append(html);
                  });
          });
  &lt;/script&gt;
  </code></pre>
  
  <p>order.inc.php (php includes file) :</p>
  
  <pre><code>&lt;?php
  
  // Save Button
  if (isset($_POST['submitOrder'])) {
  
      // passenger
      $p_name = $_POST['p_name'];
      $ticket_no = $_POST['ticket_no'];
  
      var_dump($p_name);
      echo '&lt;br/&gt;';
      var_dump($ticket_no);
      echo '&lt;br/&gt;';
  
  
  
      foreach ($p_name as $key =&gt; $value) {
          echo $p_name[$key];
          echo $ticket_no[$key];
          echo "&lt;br/&gt;";
      }
  }
  </code></pre>