[eluser]slowgary[/eluser]
You would need to call the results method on your query, like so:
Code:
$this->db->get('job_postings')->results(); //or ->results_array();
Then you can foreach the results.
I would not recommend running your query like that. You're going to run a bunch of queries in your above foreach loop, one for each job. Instead, you should get all the jobs from one single query. You can use something like where_in() to get all the jobs that match your array of job_ids. If you're using PHP 5, you can also chain the database methods, making things a little cleaner and easier.
Try this:
Code:
$jobs = $this->input->post('job');
foreach($jobs as $key => $job_id)
{
$job_id_array[] = $job_id;
}
$jobs_info = $this->db->where_in('id', $job_id_array)->get('job_postings')->result_array();
foreach($jobs_info as $job_info)
{
echo $job_info['job_name'].$job_info['job_desc'].$job_info['job_salary'];
}
This assumes your database table has fields named job_name, job_desc, job_salary. You should break this code up though and put the first foreach in your controller, the database call in your model, and the second foreach in your view.
Good luck.