title: Multidimensional array element if empty delete entire sub-array PHP
body: <p>I'm trying to delete sub array of my multidimensional array, if any of the value is empty, than delete entire sub array. I want a universal function for the same! Dont want to type specific keys. And than ReIndex the newly formed array.</p>
  
  <p>My array is like</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [name] =&gt; Test
              [mobile] =&gt; 613594551
              [email] =&gt; test@test.com
          )
      [1] =&gt; Array
          (
              [name] =&gt; Test1
              [mobile] =&gt; 613594552
              [email] =&gt; test2@test.com
          )
      [2] =&gt; Array
          (
              [name] =&gt; Test2
              [mobile] =&gt; 613594553
              [email] =&gt; test3@test.com
          )
      [3] =&gt; Array
          (
              [name] =&gt; Test3
              [mobile] =&gt; 613594554
              [email] =&gt; test4@test.com
          )
  )
  </code></pre>
  
  <p>So if my array is </p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [name] =&gt; 
              [mobile] =&gt; 613594551
              [email] =&gt; test@test.com
          )
      [1] =&gt; Array
          (
              [name] =&gt; Test1
              [mobile] =&gt; 
              [email] =&gt; test2@test.com
          )
      [2] =&gt; Array
          (
              [name] =&gt; Test2
              [mobile] =&gt; 613594553
              [email] =&gt; 
          )
      [3] =&gt; Array
          (
              [name] =&gt; Test3
              [mobile] =&gt; 613594554
              [email] =&gt; test4@test.com
          )
  )
  </code></pre>
  
  <p>Than display</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [name] =&gt; Test3
              [mobile] =&gt; 613594554
              [email] =&gt; test4@test.com
          )
  )
  </code></pre>