title: How to get data from controller to view?
body: <p>I need to pass data from controller to view. I used loop in controller which run more than 1 minute. </p>
  
  <pre><code>for($i=0;$i&lt;$count;$i++){
  
  $peicedata = getdata();
  $ar=explode(",",$peicedata);
  
  $data['firstname']=$ar[0];
  $data['lastname']=$ar[1];
  $data['email']=$ar[2];
  $data['website']=$ar[3];
  
  
  }
  </code></pre>
  
  <p>above function <code>getdata()</code> take around 10 second to get data back. when data get from <code>getdata()</code> i want to pass that data immidiate to view. </p>