PHP does have the elseif function. But that's not what you want. You want to use just "else" here.
Elseif requires that you provide another condition:
[tt]if (foo == 3)
{
//do one thing
}
elseif (foo == 4)
{
//do another thing
}[/tt]
Personally, I intensely dislike the elseif construct and have never found a situation where code readability could not be improved through the use of nested if-statements or a switch statement.
First of all comparisons on PHP are done witrh 2 "=" equal signs so
Code:
<?
if ($_SESSION['language']="en")
should be
if ($_SESSION['language']=="en")
Second alwasy enclose your your IF statements in curly braces:
Code:
if ($_SESSION['language'][blue]==[/blue]"en")[red]{[/red]
include("htmltop_en.html");
[red]}[/red]
elseif[red]{[/red]
include("htmltop_vn.html");
[red]}[/red]
?>
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Right Sleipnir, elseif requires a condition, howd i miss that.
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.