PHP Key value FOREACH
<p>Ok I have a file that is trying to retrive job numbers out of a database call and then put them into key value pairs to return to my jquery function that will export them to my page. I am getting a 500 error when I try to run the page and it is on this page. What am I doing wrong with this output/call?</p>

<pre><code>$output = new array();
$job = new job;
$jobs = $job-&gt;get_from_db( "`code` = '" . $_GET['term'] . "'" );

foreach ( $jobs as $key =&gt; $current)
    {
        $output[$key]['value'] = $current-&gt;code;
        $output[$key]['id'] = $current-&gt;id;
    }
echo json_encode($output);
</code></pre>
