note 108367 deleted from function.trim by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 May 2012 17:04:55 +0000 |
| Subject: | note 108367 deleted from function.trim by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-187643@lists.php.net to get a copy of this message | ||
Note Submitter: ives at ives dot tk
----
function trimArray($array){
$newArr = array();
$data = each($array);
while( $data ){
$key = $data['key'];
$value = $data['value'];
if( is_array($value) ){
$value = trimArray($value);
}else{
$value = trim($value);
}
$newArr[$key] = $value;
$data = each($array);
}
return $newArr;
}