title: How to upload a CSV file and save it into an multidimensional array?
body: <p>Basically, I need a way to upload a CSV file and save it into a multidimensional array as the title says.</p>
  
  <p>I have searched far and wide online, and I found a jQuery-csv add on here:
  <a href="https://github.com/evanplaice/jquery-csv" rel="nofollow noreferrer">https://github.com/evanplaice/jquery-csv</a></p>
  
  <p>That jQuery library can handle converting the CSV file into a multidimensional array, although it is the upload part I am having real trouble with.</p>
  
  <p>I am having difficulty on how to interact PHP and jQuery together. I know for a fact that PHP is always called first at the server, then jQuery/Javascript at the client side. Therefore, I am very confused on how to allow a used to upload a CSV file via PHP, save the location, pass it to jQuery, and then save it there.</p>
  
  <p>I am sure this is most probably a simple task, although I could not find my answer anywhere.</p>
  
  <p><strong>So here is how I would like to do it:</strong></p>
  
  <ul>
  <li>Upload the file with PHP</li>
  <li>Save the CSV into a string with either PHP or jQuery</li>
  <li>Parse the CSV into a a multidimensional array using <code>$.csv.toArrays(csv);</code> from jQuery-csv add on</li>
  </ul>
  
  <p>All help and suggestions is greatly appreciated, thanks!</p>