title: Delete all empty sub-array in array
body: <p>How can I filter array and delete all empty elements.
  I need to remove empty elements from an array, including arrays in arrays.</p>
  
  <p>From that array:</p>
  
  <pre><code>$array = [
      'ip' =&gt; '127.0.0.1',
      'user_agent' =&gt; 'dkdkdk',
      '_id' =&gt; 'fjjfjf',
      'user' =&gt; [
          'longName' =&gt; '', 
          'shortName' =&gt; '',
          'username' =&gt; [
              'a' =&gt; 'b',
              'c' =&gt; ''
              ]
      ],
      'dsd' =&gt; [
          'zz' =&gt; [
              'dd' =&gt; [
                  'ff' =&gt; ''
                  ]
              ]
          ]
      ],
      'dsddd' =&gt; '',
      'vcv' =&gt; null,
      'aavx' =&gt; 0
  ];
  </code></pre>
  
  <p>I want get:</p>
  
  <pre><code>$array = [
      'ip' =&gt; '127.0.0.1',
      'user_agent' =&gt; 'dkdkdk',
      '_id' =&gt; 'fjjfjf',
      'user' =&gt; [
          'username' =&gt; [
              'a' =&gt; 'b',
              ]
      ],
      'aavx' =&gt; 0
  ];
  </code></pre>
  
  <p>I try use array_filter but it remove only not array keys</p>