title: Remove only the whitespaces in array but not the 0(Zero) number
body: <p>So I'm trying to remove white spaces in a multidimensional array. But the integer 0 is included in removing.</p>
  
  <p>I've already tried array_filter and array_map to remove it.</p>
  
  <pre><code>$a="array(
        [0] =&gt; test
        [1] =&gt; 0
        [2] =&gt; test
        [3] =&gt; 
        [4] =&gt; 
        [5] =&gt; test
  )
  array(
        [0] =&gt; test
        [1] =&gt; 
        [2] =&gt; 
        [3] =&gt; 
        [4] =&gt; 0
        [5] =&gt; test
  )"
  $b=array_filter(array_map('trim', $a));
  print_r($b);
  
  </code></pre>
  
  <p>The output is</p>
  
  <pre><code>"array(
        [0] =&gt; test
        [2] =&gt; test
        [5] =&gt; test
  )
  array(
        [0] =&gt; test
        [5] =&gt; test
  )"
  </code></pre>
  
  <p>But the expected output should be like this</p>
  
  <pre><code>"array(
        [0] =&gt; test
        [1] =&gt; 0
        [2] =&gt; test
        [5] =&gt; test
  )
  array(
        [0] =&gt; test
        [4] =&gt; 0
        [5] =&gt; test
  )"
  </code></pre>