note 64274 deleted from function.trim by bjori

From: Date: Tue, 11 Apr 2006 11:37:35 +0000
Subject: note 64274 deleted from function.trim by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-107753@lists.php.net to get a copy of this message
Note Submitter: Reason: bad code ---- A simple, recursive (another one) trim_array function (using pass by reference): <?php function _trim_array_trim(&$value){ if (is_array($value)){ trim_array($value); } else { $value = trim($value); } } function trim_array(&$array){ array_walk($array, "_trim_array_trim"); } ?> usage: trim_array($myArray);

« previous php.notes (#107753) next »