Pass PHP array into Javascript array
<p>Referring to the title. I have an array which I coded like this:-</p>

<pre><code>$query = "SELECT * FROM server";
$result = mysql_query($query);
$dServer = array();

     while($row = mysql_fetch_assoc($result))
      {
              $dServer[] = $row['model'];
      }    
</code></pre>

<p>Now, how do I pass the $dServer array into a Javascript array?</p>

<p>For example, this array:</p>

<pre><code>var a = new Array();
</code></pre>
