PHP array to echo javascript array that I can access?
<p>I have a php array called $user.</p>

<p>At the minute I am getting the variables across to javascript by manually adding them like so.</p>

<pre><code>var username = ' . $user['username'] . ';
</code></pre>

<p>And so on is there a way I can make php echo a javascript array that I can access?</p>
