Trim arr

Jmnote (토론 | 기여)님의 2012년 1월 2일 (월) 16:37 판 (새 문서: <source lang='php'> function trim_arr($arr, $removeEmpty = false) { if($removeEmpty == 'REMOVE_EMPTY')$removeEmpty = true; $cnt = count($arr); for($i=$cnt-1;$i>-1;$i--) { $arr[$i...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
function trim_arr($arr, $removeEmpty = false) {
	if($removeEmpty == 'REMOVE_EMPTY')$removeEmpty = true;
	$cnt = count($arr);
	for($i=$cnt-1;$i>-1;$i--) {
		$arr[$i] = trim($arr[$i]);
		if($removeEmpty)array_splice($arr, $i, 1);
	}	
	return $arr;
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}