title: JSON encode MySQL results
body: <p>How do I use the <code>json_encode()</code> function with MySQL query results? Do I need to iterate through the rows or can I just apply it to the entire results object?</p>