title: Parse javascript source code text and populate two arrays
body: <p>I am trying to parse some data from a web page using php.
  What I have is a html page containing the following lines:</p>
  <pre><code>var VALUES = new Array();
  VALUES[0] = new Array(&quot;70&quot;,&quot;09/11/2020 00.00&quot;,&quot;7.3&quot;,&quot;&quot;);
  VALUES[3] = new Array(&quot;73&quot;,&quot;09/11/2020 00.15&quot;,&quot;7.5&quot;,&quot;&quot;);
  VALUES[6] = new Array(&quot;75&quot;,&quot;09/11/2020 00.30&quot;,&quot;7.4&quot;,&quot;&quot;);
  VALUES[9] = new Array(&quot;78&quot;,&quot;09/11/2020 00.45&quot;,&quot;7.8&quot;,&quot;&quot;);
  VALUES[12] = new Array(&quot;81&quot;,&quot;09/11/2020 01.00&quot;,&quot;8.1&quot;,&quot;&quot;);
  ...
  </code></pre>
  <p>I need to populate two different arrays (<code>datetime</code> and <code>temp</code>)</p>
  <p>For example, the first line would produce these elements:</p>
  <pre><code>$datetime[0] = &quot;09/11/2020 00.00&quot;;
  $temp[0] = 7.3;
  </code></pre>
  <p>and so on.</p>
  <p>I am really new in doing this with php and I know almost nothing about the pattern syntax. What I am trying to do is something like this:</p>
  <pre><code>$content=file_get_contents($pageURL);
  preg_match('#VALUES[*] = new Array(*)#',$content,$match);
  </code></pre>