如果不接受上课

时间:2011-11-29 00:22:54

标签: php

我试图让我的语言切换器根据语言网址改变字体重量,但我无法接受该课程

if ($_REQUEST["lang"] == "en") 
{ 
    echo '<div class="langlight"><a href="http://xyz.com/">Svenska</a></div>';
} 
else 
{
    echo '<div class="langbold"><a href="http://xyz.com/">Svenska</a></div>';

};

if ($_REQUEST["lang"] == "en") 
{
    echo '<div class="langbold"><a href="http://xyz.com/">English</div>';
} 
else 
{
    echo '<div class="langlight"><a href="xyz.com/">English</div>';
};

1 个答案:

答案 0 :(得分:1)

删除分号,缺少结束标记:

if ($_REQUEST["lang"] == "en") 
{ 
    echo '<div class="langlight"><a href="http://xyz.com/">Svenska</a></div>';
} 
else 
{
    echo '<div class="langbold"><a href="http://xyz.com/">Svenska</a></div>';

}

if ($_REQUEST["lang"] == "en") 
{
    echo '<div class="langbold"><a href="http://xyz.com/">English</a></div>';
} 
else 
{
    echo '<div class="langlight"><a href="xyz.com/">English</a></div>';
}