if(preg_match('/(MSIE [4-8]\.[0-9]+)/',$_SERVER['HTTP_USER_AGENT'])){ echo 'Es inferior o igual a 8'; }