I have a php array called $user.
At the minute I am getting the variables across to javascript by manually adding them like so.
var username = ' . $user['username'] . ';
And so on is there a way I can make php echo a javascript array that I can access?