I get a parse error on line 3 with the following code that is designed to detect what browser version is being used:
<?php
$browser_type = getenv("HTTP_USER_AGENT")
if (preg_match("/MSIE/i", "$browser_type")) {
echo "Using MSIE.";
} else if (preg_match("Mozilla/i", "$browser_type")) {
echo "Using Netscape.";
} else {
echo "$browser_type";
}
?>
i'm not sure i'm using the preg_match function correctly. any help?