title: PHP - trim array elements value without foreach
body: <p>I am using following code in php:
  Code:</p>
  
  <pre><code>$input = array("     text1","text2      "," text3       ","     text4");
  $output = array();
  foreach($input as $val)
       {
          $output[] = trim($val);
       }
  var_dump($output);
  </code></pre>
  
  <p>Is it possible to trim array elements value without foreach loop? </p>