title: how filter array recursive if match condition in php
body: <p>lets say i have a array</p>
  
  <pre><code>array
     array
       key1 = 'hello im a text'
       key2 = true;
       key3 = '&gt;&lt;&gt;&lt;';
      array
        array
           key1 = 'hello another text'
           key2 = 'im a text too'
           key3 = false;
           array
              key1 = ')(&amp;#'
      array
      key1 = 'and so on'
  </code></pre>
  
  <p>how can i get something like below from the above arrays?</p>
  
  <p>array
      1 => 'hello im a text';
      2 => 'hello another text;
      3 => 'im a text too';
      4 => 'and so on';</p>
  
  <p>heres what ive done</p>
  
  <pre><code>$found = array();
  function search_text($item, $key)
  {
      global $found;
      if (strlen($item) &gt; 5)
      {
          $found[] = $item;
      }
  }
  array_walk_recursive($array, 'search_text');
  var_dump($found);
  </code></pre>
  
  <p>but somehow it doesn't work</p>