title: Remove empty array in multidimensional array using laravel phpexcel
body: <p>I want remove array if element having empty or count '0'.I used PHPEXCEL in laravel.</p>
  
  <p>My Code:</p>
  
  <pre><code>$results=Excel::load('assets/uploads/studentdata/file.xlsx', function($reader) {
  
  })-&gt;get()-&gt;toArray();
  </code></pre>
  
  <p>I got output is following like,</p>
  
  <pre><code>Array ( [0] =&gt; Array ( [grade] =&gt; 12 [schoolentrancedate] =&gt; Carbon\Carbon Object ( [date] =&gt; 2014-09-02 00:00:00 
  
  [timezone_type] =&gt; 3 [timezone] =&gt; UTC ) [schoolexitdate] =&gt; Carbon\Carbon Object ( [date] =&gt; 2015-06-25 00:00:00 
  
  [timezone_type] =&gt; 3 [timezone] =&gt; UTC ) [studentfirstname] =&gt; Gutierrez [studentmiddlename] =&gt; [studentlastname] =&gt; Larry 
  
  [age] =&gt; [gender] =&gt; M [dateofbirth] =&gt; Carbon\Carbon Object ( [date] =&gt; 1997-06-16 00:00:00 [timezone_type] =&gt; 3 [timezone] 
  
  =&gt; UTC ) [language] =&gt; [parentfullname] =&gt; Irma Perlera [phone] =&gt; 617-778-3913 [mobile] =&gt; 617-778-3913 [parentemail] =&gt; 
  
  info1234@gmail.com [emergencypersonfullname] =&gt; Irma Perlera [emergencypersonphone] =&gt; 617-778-3913 [emergencypersonmobile] =&gt; 
  
  617-778-3913 [house] =&gt; 237 [apartment] =&gt; [street] =&gt; Ferry [city] =&gt; Everett [state] =&gt; MA [zipcode] =&gt; [weekdayfrom] =&gt; 
  
  [weekdayto] =&gt; [intime] =&gt; [outtime] =&gt; [mondayintime] =&gt; Carbon\Carbon Object ( [date] =&gt; 2015-03-16 08:10:00 [timezone_type] 
  
  =&gt; 3 [timezone] =&gt; UTC ) [mondayouttime] =&gt; Carbon\Carbon Object ( [date] =&gt; 2015-03-16 14:30:00 [timezone_type] =&gt; 3 
  
  [timezone] =&gt; UTC ) [tuesdayintime] =&gt; Carbon\Carbon Object ( [date] =&gt; 2015-03-16 08:10:00 [timezone_type] =&gt; 3 [timezone] =&gt; 
  
  UTC ) [tuesdayouttime] =&gt; Carbon\Carbon Object ( [date] =&gt; 2015-03-16 14:30:00 [timezone_type] =&gt; 3 [timezone] =&gt; UTC ) 
  
  [wednesdayintime] =&gt; Carbon\Carbon Object ( [date] =&gt; 2015-03-16 08:10:00 [timezone_type] =&gt; 3 [timezone] =&gt; UTC ) 
  
  [wednesdayouttime] =&gt; Carbon\Carbon Object ( [date] =&gt; 2015-03-16 13:30:00 [timezone_type] =&gt; 3 [timezone] =&gt; UTC ) 
  
  [thursdayintime] =&gt; Carbon\Carbon Object ( [date] =&gt; 2015-03-16 08:10:00 [timezone_type] =&gt; 3 [timezone] =&gt; UTC ) 
  
  [thursdayouttime] =&gt; Carbon\Carbon Object ( [date] =&gt; 2015-03-16 14:30:00 [timezone_type] =&gt; 3 [timezone] =&gt; UTC ) 
  
  [fridayintime] =&gt; Carbon\Carbon Object ( [date] =&gt; 2015-03-16 08:10:00 [timezone_type] =&gt; 3 [timezone] =&gt; UTC ) 
  
  [fridayouttime] =&gt; Carbon\Carbon Object ( [date] =&gt; 2015-03-16 14:30:00 [timezone_type] =&gt; 3 [timezone] =&gt; UTC ) [note] =&gt; 
  
  [oneway] =&gt; [fromhome] =&gt; [fromschool] =&gt; [twoway] =&gt; [43] =&gt; ) 
  
  
  [1] =&gt; Array ( [grade] =&gt; [schoolentrancedate] =&gt; [schoolexitdate] =&gt; [studentfirstname] =&gt; [studentmiddlename] =&gt; 
  
  [studentlastname] =&gt; [age] =&gt; [gender] =&gt; [dateofbirth] =&gt; [language] =&gt; [parentfullname] =&gt; [phone] =&gt; [mobile] =&gt; 
  
  [parentemail] =&gt; [emergencypersonfullname] =&gt; [emergencypersonphone] =&gt; [emergencypersonmobile] =&gt; [house] =&gt; [apartment] =&gt; 
  
  [street] =&gt; [city] =&gt; [state] =&gt; [zipcode] =&gt; [weekdayfrom] =&gt; [weekdayto] =&gt; [intime] =&gt; [outtime] =&gt; [mondayintime] =&gt; 
  
  [mondayouttime] =&gt; [tuesdayintime] =&gt; [tuesdayouttime] =&gt; [wednesdayintime] =&gt; [wednesdayouttime] =&gt; [thursdayintime] =&gt; 
  
  [thursdayouttime] =&gt; [fridayintime] =&gt; [fridayouttime] =&gt; [note] =&gt; [oneway] =&gt; [fromhome] =&gt; [fromschool] =&gt; [twoway] =&gt; [43] 
  
  =&gt; ) 
  
  [2] =&gt; Array ( [grade] =&gt; [schoolentrancedate] =&gt; [schoolexitdate] =&gt; [studentfirstname] =&gt; [studentmiddlename] =&gt; 
  
  [studentlastname] =&gt; [age] =&gt; [gender] =&gt; [dateofbirth] =&gt; [language] =&gt; [parentfullname] =&gt; [phone] =&gt; [mobile] =&gt; 
  
  [parentemail] =&gt; [emergencypersonfullname] =&gt; [emergencypersonphone] =&gt; [emergencypersonmobile] =&gt; [house] =&gt; [apartment] =&gt; 
  
  [street] =&gt; [city] =&gt; [state] =&gt; [zipcode] =&gt; [weekdayfrom] =&gt; [weekdayto] =&gt; [intime] =&gt; [outtime] =&gt; [mondayintime] =&gt; 
  
  [mondayouttime] =&gt; [tuesdayintime] =&gt; [tuesdayouttime] =&gt; [wednesdayintime] =&gt; [wednesdayouttime] =&gt; [thursdayintime] =&gt; 
  
  [thursdayouttime] =&gt; [fridayintime] =&gt; [fridayouttime] =&gt; [note] =&gt; [oneway] =&gt; [fromhome] =&gt; [fromschool] =&gt; [twoway] =&gt; [43] 
  
  =&gt; )  )
  </code></pre>
  
  <p>I need to remove above array if array[1] ,array[2].. is empty or count '0' means its should be remove or if any other solution to avoid to read empty rows using phpexcel in laravel.</p>