/**
* Enhanced trim() to support array
* @author Wilson Zeng
*/
function exTrim($mixed, $removeEmptyString = FALSE){
if(is_array($mixed)){
foreach($mixed as $index => &$item){
$item = exTrim($item);
if($removeEmptyString && $item === ''){
array_splice($mixed, $index, 1);
}
}
return $mixed;
}else{
return trim($mixed);
}
}
posted on 2012-01-17 12:05  重生  阅读(204)  评论(0编辑  收藏  举报