I need a value of an array in model to compare with another value.How can I get it?  

this is my code in model:

```
function get_order(){
$this->db->select('order');
$this->db->order_by('order','desc');
$this->db->limit(1);
$query=$this->db->get('section');     

```

I need the last order record from $query.I tried this code but it does not show anything . 

```
echo $query['order'];

```

Thanks for your help