title: How to pass multiple datepickers value as an array to php
body: <p>I am following this <a href="https://stackoverflow.com/questions/20397247/set-multiple-jquery-datepickers-value-based-on-one-jquery-datepickers-selected">Set multiple jQuery Datepickers' value based on one jQuery Datepicker's selected date</a> which is already asked by me and also received answer as well.</p>
  
  <p>I have following multiple dates on a page and change on first date picker will change values for other date pickers on the screen.</p>
  
  <p>First date picker is one which value will changes values for other date pickers.</p>
  
  <p><img src="https://i.stack.imgur.com/xlrnm.png" alt="enter image description here"></p>
  
  <p><strong><em>Note: Please note that I want to display Date Picker from Image and don't want to use input type as text</em></strong></p>
  
  <p>I want to know the best way to store this values to server. You can see my current code same as suggested in answer in above question.</p>
  
  <pre><code>$("#datepicker1, #datepicker2, #datepicker3, #datepicker4").datepicker();
  $("#datepicker1").datepicker("option", "onSelect", function (dateText, inst) {
      var date1 = $.datepicker.parseDate(inst.settings.dateFormat || $.datepicker._defaults.dateFormat, dateText, inst.settings);
  
      var date2 = new Date(date1.getTime());
      date2.setDate(date2.getDate() + 1);
      $("#datepicker2").datepicker("setDate", date2);
  
      var date3 = new Date(date1.getTime());
      date3.setDate(date3.getDate() + 2);
      $("#datepicker3").datepicker("setDate", date3);
  
      var date4 = new Date(date1.getTime());
      date4.setDate(date4.getDate() + 3);
      $("#datepicker4").datepicker("setDate", date4);
  });
  </code></pre>
  
  <p>But I would like to implement it through js array and then want to save data from PHP.</p>
  
  <p>Can anybody guide me on this?</p>
  
  <p>If there would be little code help then it will be very great help for me.</p>