title: Completely remove empty array from multidimensional array
body: <p>Let's say I have the following array:</p>
  
  <pre><code>Array
  (
      [Particulier] =&gt; Array
          (
              [Weekend] =&gt; Array
                  (
                      [2015] =&gt; Array
                          (
                              [01] =&gt; Array
                                  (
                                  )
  
                              [02] =&gt; Array
                                  (
                                  )
  
                              [03] =&gt; Array
                                  (
                                  )
  
                              [04] =&gt; Array
                                  (
                                      [startDate] =&gt; 24-04-2015
                                      [endDate] =&gt; 27-04-2015
                                  )
  
                              [05] =&gt; Array
                                  (
                                      [startDate] =&gt; 01-05-2015
                                      [endDate] =&gt; 04-05-2015
                                  )
  
                              [06] =&gt; Array
                                  (
                                  )
  </code></pre>
  
  <p>Is it possible for me to completely remove all empty arrays (including keys),
  like so:</p>
  
  <pre><code>Array
  (
      [Particulier] =&gt; Array
          (
              [Weekend] =&gt; Array
                  (
                      [2015] =&gt; Array
                          (
                              [04] =&gt; Array
                                  (
                                      [startDate] =&gt; 24-04-2015
                                      [endDate] =&gt; 27-04-2015
                                  )
  
                              [05] =&gt; Array
                                  (
                                      [startDate] =&gt; 01-05-2015
                                      [endDate] =&gt; 04-05-2015
                                  )
  </code></pre>
  
  <p>If any other information is required, please ask. I'm new to this.
  Thanks in advance!</p>