function array_key_exists ( key, search ) { // Checks if the given key or index exists in the array
//
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// input sanitation
if( !search || (search.constructor !== Array && search.constructor !== Object) ){
return false;
}
return search[key] !== undefined;
}