我的工作从PHP的书为例,我得到第8行的错误与此代码意外T_ELSE错误在PHP
<?php
$agent = getenv("HTTP_USER_AGENT");
if (preg_match("/MSIE/i", "$agent"));
{
$result = "You are using Microsoft Internet Explorer";
}
else if (preg_match("/Mozilla/i", "$agent"));
{
$result = "You are using Mozilla firefox";
}
else {$result = "you are using $agent"; }
echo $result;
?>
辉煌,感谢您的解释! – Jacksta 2010-04-15 03:32:11