How do I retrieve values from a PHP array?
<p>I have a array stored in a PHP file in which I am storing all the values.</p>

<p>I am trying to loop through the entire array in JavaScript. How should I do that?</p>

<p>The following does not work:</p>

<pre><code>var index = 0;
var info = 1;

while(index&lt;4) {
    info = &lt;?php echo $a[?&gt;index&lt;?php];?&gt;
    index++;
}
</code></pre>
