[eluser]matches[/eluser]
Can someone explain to me how to parse this result array?
Array ( [0] => Array ( [id] => 126 [user_id] => 2 [number] => 1515 [address_1] => Address [address_2] => Address [city] => City [zip] => 0 ) )
Here is the model method:
Code:
function get_slideshow_by_id($id) {
$this->db->where('id', $id);
$query = $this->db->get('shows');
return $query->result_array();
}
Here is the controller method:
Code:
function current_show()
{
$this->load->model('slideshow_model');
$slideshow_id = $this->uri->segment(3);
$query = $this->slideshow_model->get_slideshow_by_id($slideshow_id);
print_r($query);
echo $query->number;
$data['main_content'] = 'slideshow/current';
$this->load->view('includes/base', $data);
}
Thanks for your help.