Here it's my sample of code :

```
public function show($imei,$start_time,$end_time,$dateto) { 

    $from_time = str_replace('-','/',$start_time);
    $fromi=strtotime($from_time . ' ' . $end_time);
    $too1=strtotime($from_time . ' ' . $dateto); 

    $data['coordinates'] = $this->road_model->get_coordinatesudhetime($imei, $fromi, $too1);
    $this->load->view('road/show', $data);

                if (!empty($data))
        {
    echo 'Array it's empty*';
        }
     }

```

I want to check when $data it's empty .