title: Converting MySQL result array to JSON
body: <p>I want to convert my database query's result array to JSON format in PHP. Here is my code:</p>
  <pre><code>$row = mysql_fetch_array($result)
  </code></pre>
  <p>I want to convert <code>$row</code> to JSON format and pass the JSON data to a jQuery plugin.</p>