Posted By

jpsirois on 07/22/09


Tagged

array trim Shortest recursivly


Versions (?)

PHP Shortest Trim Array recursivly


 / Published in: PHP
 

URL: http://www.jonasjohn.de/snippets/php/trim-array.htm

  1. /**
  2.  * Trims a entire array recursivly.
  3.  *
  4.  * @author Jonas John
  5.  * @version 0.2
  6.  * @link http://www.jonasjohn.de/snippets/php/trim-array.htm
  7.  * @param array $Input Input array
  8.  */
  9. function TrimArray($Input){
  10. if (!is_array($Input))
  11. return trim($Input);
  12.  
  13. return array_map('TrimArray', $Input);
  14. }

Report this snippet  

You need to login to post a comment.