title: Creating an JS array from PHP
body: <p>I'm developing a Google Geochart and I'd like it to be dynamic. This is the static code to make the array to store the two values are as follows. The Country is the unique identifier for the map and the colour value is what the colour of the map will be. (Irrelevant but context) </p>
  
  <pre><code>  arrayData = [['Country','Color Value'],
    ['China',3],
    ['Russia',2.6],
    ['France',2.5],
    ['Spain',2.4],
    ['Portugal',1.1]
  </code></pre>
  
  <p>I'd like to be able to make this array from a for loop taken from php echo values. Something like this pseudo code;</p>
  
  <pre><code>for (i in range table.length)
  
   arrayData = [['Country','Color Value'],
  
   [&lt;?php echo $statements["Country"]; ?&gt;], [&lt;?php echo $statements["Color_Value"]; ?&gt;], 
  </code></pre>
  
  <p>So similar to a php table as it gets all the values, I would like to do the same but for a JavaScript array. Any advice would be kind! </p>
  
  <p>EDIT: The static code is an example, I want to take values from the database, the first value being country and the second value being colour value. BOTH from the database. I suppose in turn making the geochart dynamic  </p>