title: how to send form data in ajax with multiple files without refreshing?
body: <p>in my form code there is text input, checkbox input, file input type...etc,
  everything working fine except the file input it's only taking one value ( multiple files upload isn't sending through ajax call ) how can i send arrays inside the <strong>serialize()</strong> function ?</p>
  <ul>
  <li><p>Code :</p>
  <pre><code>  &lt;form action=&quot;#&quot; id=&quot;postAdd&quot; enctype=&quot;multipart/form-data&quot;&gt;
     &lt;input accept=&quot;.png,.jpg,.jpeg&quot; type=&quot;file&quot; class=&quot;form-control-file d-none&quot; id=&quot;file-upload&quot; name=&quot;file[]&quot; multiple required&gt;
     &lt;input autocomplete=&quot;off&quot; type=&quot;text&quot; class=&quot;form-control bg-white&quot; name=&quot;discName[]&quot;&gt;
     &lt;button id=&quot;postAdbtn&quot; class=&quot;btn btn-primary d-block mt-2&quot;&gt;Submit&lt;/button&gt;
    &lt;/form&gt;     $(document).ready(function() {
        $('#postAdbtn').click(function() {
            var form = $('#postAdd').serialize();
            $.ajax({
                url: 'add-product-done.php',
                method: &quot;POST&quot;,
                data: {
                    form: form
                },
                success: function(data) {
                    $('.fetchData').html(data);
                }
            })
        });
    });
  </code></pre>
  </li>
  </ul>
  <p>one more thing, how can i get the files in <strong>PHP</strong> ?
  and thanks</p>