You could also use an array (I would):
$browser_arr = array("Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)",
"Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)");
// etc.
if (in_array($browser, $browser_arr)) {
// etc.
}
Also, that way you could put the data in an included file, perhaps along with other data, for easier editing and less-cluttered code.
Also, the "swich" and "if" could do two different things. The "if" statement you posted will allow the same action for all of the browsers. A "switch" statement (or a bunch of "elsifs") could be suitable if you want a different action for each browser, although bubblenut's solution will work fine.