note 105339 modified in function.trim by danbrown

From: Date: Wed, 10 Aug 2011 15:47:06 +0000
Subject: note 105339 modified in function.trim by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-182395@lists.php.net to get a copy of this message
Combined filter and trim array. <?php function _trim_value(&$value) { if (is_string($value)) $value = trim($value); } function array_filter_and_trim($arr) { array_walk($arr, '_trim_value'); return array_filter($arr); } ?> --was-- Combined filter and trim array. function _trim_value(&$value) { if (is_string($value)) $value = trim($value); } function array_filter_and_trim($arr) { array_walk($arr, '_trim_value'); return array_filter($arr); } http://php.net/manual/en/function.trim.php

« previous php.notes (#182395) next »