title: Passing PHP variables to JSON
body: <p>Im new to JSON sintax and I need help to pass some results I've pulled via php from a database, to a JSON code. Here's the code:</p>
  
  <pre><code>&lt;?php
          $id_num = urldecode (intval($_REQUEST['id_cod']));
          $rs = $lista-&gt;noticias_testa(1,$id_num);
          $result = mysql_num_rows($rs);
  
          $rs = $lista-&gt;noticiaAll($id_num);
          $result = mysql_num_rows($rs);
  
          $audio = "files/audios/".mysql_result($rs,0,"audio");
          $title_audio = mysql_result($rs,0,"title_audio");
      ?&gt;
  </code></pre>
  
  <p>And this JSON to fill a playlist for my mp3 player</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      //&lt;![CDATA[
      $(document).ready(function(){
  
          new jPlayerPlaylist({
              jPlayer: "#jquery_jplayer_1",
              cssSelectorAncestor: "#jp_container_1"
          }, [
              {
                  title:"place to put php variable $title_audio",
                  mp3:"path to the music.mp3",                   
              },
          ]);
      });
      //]]&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>I want to pass the php variable <strong>"$audio"</strong> to the JSON <strong>"mp3 path"</strong> and <strong>title</strong>.</p>
  
  <p>Thanks in advance</p>