Return to Snippet

Revision: 33668
at October 12, 2010 02:39 by sb_01


Updated Code
function isDefine($str) {
	if(is_array($str)){
		foreach($str as $key => $value) {
			if(isset($str[$key]) and !empty($str[$key])) {
				$res[] = true;
			} else {
				$res[] = false;
			}
			if(array_search(false, $res) === true) {
				return false;
			}
		}
	} else {
		if(isset($str) and !empty($str)) {
			return true;
		}
	}
	return false;
}

Revision: 33667
at October 12, 2010 01:22 by sb_01


Initial Code
function isDefine($str) {
	if(isset($str) and !empty($str)) {
		return true;
	}
	return false;
}

Initial URL

                                

Initial Description

                                

Initial Title
isDefine - isset & empty function

Initial Tags

                                

Initial Language
PHP