if(array_key_exists('key', $array)){ } if(isset($array['key'])){ } 转载于:https://my.oschina.net/vvcumt/blog/424846