The $_SERVER['HTTP_USER_AGENT'] variable tells you which browser type a visitor is using to view your page. This is particularly useful if your code is browser specific.
Use as follows:
echo $_SERVER['HTTP_USER_AGENT'];
Using the $_SERVER['HTTP_USER_AGENT'] on this page will output the following: