Store Array Javascript to PHP with session : <p>I want to store array from index.html to file.php with $_SESSION but I'm getting stuck (I don't know how to store and access it, since im new in php).</p>

<p>Here my codes in <strong>index.html</strong>:</p>

<pre><code>&lt;?php
  session_start();
  $_SESSION["myArray"] = $array;
?&gt;
$(function generateArray (parameter) {

 var array = ["hello","world"];

});
</code></pre>

<p>Here my codes in file.php:</p>

<pre><code>&lt;?php
  session_start();
  //print_r($_SESSION["myArray"]) --&gt; how can I do that?
 ?&gt;
</code></pre>

<p>Can somebody help me? :')</p>
