I found this code over at PHPBuilder.com and am attempting to impliment it. If I echo the $style variable at the end it returns the correct .css file reference depending on which browser I'm using but the stylesheet itself is not being recognized. I think the inline PHP code is the problem because if I change this:
<link rel="STYLESHEET" href="<?php $style; ?>" type="text/css">
To this:
<link rel="STYLESHEET" href="style.css" type="text/css">
the style.css file is recognized. Here's the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Test Browser Detect</title>
<?php

function find($component) {
global $HTTP_USER_AGENT;
$result = stristr($HTTP_USER_AGENT,$component);
return $result;
}

if ( find('MSIE 4') or find('MSIE 5') ) {
if ( find('Mac') ) {
$style = ( find('MSIE 5') ) ? 'style.css':'stylemac.css';
}
elseif ( find('Win') ) {
$style = 'style.css';
}
}
elseif ( !find('MSIE') ) {
if ( find('Mozilla/5') or find('Mozilla/6') ) {
$style = 'stylenswin.css';
}
elseif ( find('Mozilla/4') ) {
if ( find('Mac') ) {
$style = 'stylemac.css';
}
elseif ( find('Win') ) {
$style = 'stylenswin.css';
}
else {
$style = 'stylensunix.css';
}
}
}

?>
<link rel="STYLESHEET" href="<?php $style; ?>" type="text/css">

</head>

<body>

<H1>test is MSIE</H1>
<div>test is blue</div>
<H1>test is Netscape</H1>


</body>
</html>

It's too bad this is even necessary but.....any thoughts?