how to detect internet explorer and firefox using PHP?
If you need something just to put some HTML code (like different stylesheet attached) use something like that (instead of server-side code).
Otherwise use the HTTP_ACCEPT solution because it is based on browser features not just name. Especially that a lot of IE-addons (and some spyware) change some parts of useragent.