Parsing JSON response from PHP by array index. How?
<p>I would like to know what is the latest JQuery syntax for parsing a JSON response by array index from a HTTP GET or POST request. My server side works great so I am look for way to parse the table row returned by PHP.</p>

<p>Here is my SERVER SIDE PHP code:</p>

<pre><code>  function qry_select_account($pk_account) {

  // Global variables
  Global $db_host, $db_user, $db_pass, $db_name;  

  // Connect to database server
  $dbc = mysql_connect($db_host, $db_user, $db_pass) or die(mysql_error());
  // Select target database
  mysql_select_db($db_name) or die(mysql_error());

  // suchislife801 &lt;--- Selects account information
  // Run query
  $sql_qry = mysql_query("SELECT * FROM tblaccount
                         WHERE pk_account = '$pk_account'") or die(mysql_error());

  // SQL Criteria  AND acc_confirmed = 'y' AND acc_locked = 'n'

  // Fetch table row for this user
  $row = mysql_fetch_row($sql_qry);

  print json_encode($row);

  //echo 'Account: ' . $row[0];
  //echo '&lt;br /&gt;';
  //echo 'Passowrd: ' . $row[1];
  //echo '&lt;br /&gt;';
  //echo 'Acc Level: ' . $row[2];
  //echo '&lt;br /&gt;';
  //echo 'Email: ' . $row[3];
  //echo '&lt;br /&gt;';
  //echo 'Language: ' . $row[4];
  //echo '&lt;br /&gt;';
  //echo 'Time Zone: ' . $row[5];
  //echo '&lt;br /&gt;';
  //echo 'Signup: ' . $row[6];
  //echo '&lt;br /&gt;';
  //echo 'Conf Code: ' . $row[7];
  //echo '&lt;br /&gt;';
  //echo 'Confirmed: ' . $row[8];
  //echo '&lt;br /&gt;';
  //echo 'Locked: ' . $row[9];

  mysql_free_result($sql_qry);

  // Close Connection
  mysql_close($dbc);

  }
</code></pre>

<p>Here is my JQuery code which is not working.</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(function(){


    $('#test_btn').live('click', function() {

    $.getJSON("http://localhost/api.php?call=select_account&amp;p0=suchislife801", function(json){
        alert("JSON Data: " + json);

    });



});


&lt;/script&gt;
</code></pre>
