title: How to check if an array is empty in PHP(Codeigniter)
body: <p>Here it's my sample of code :</p>
  
  <pre><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-&gt;road_model-&gt;get_coordinatesudhetime($imei, $fromi, $too1);
      $this-&gt;load-&gt;view('road/show', $data);
  
                  if (!empty($data))
          {
      echo 'Array it's empty*';
          }
       }
  </code></pre>
  
  <p>I want to check when $data it's empty .</p>