Need to put dynamically generated (PHP) data into javascript : <p>I have a simple jQuery function, like this:</p>

<pre><code>$(foo).bar({
   data:{
      //HERE GOES SOME PREFORMATTED DATA FROM DATABASE ACCESSIBLE BY PHP FUNCTION
   },
});
</code></pre>

<p>How do I do this? Thanks, cheers!</p>
