Php Error

Hi folks!

I’ve a php error but I don’t know what it wrong.

if ((isset($_SESSION[‘lang’])) || (!empty($_SESSION[‘lang’]))) {

$_SESSION['lang'] = fr;
$lang = $_SESSION['lang']

} else { // this is the line 11

$_SESSION[‘lang’] = $lang

}

it tells me : Parse error: syntax error, unexpected ‘}’

Hi Alex!

You need to add a semicolon at the end of lines

$lang = $_SESSION[‘lang’]

and

$_SESSION[‘lang’] = $lang

Also, line

$_SESSION[‘lang’] = fr;

doesn’t look good; you need to change it to

$_SESSION[‘lang’] = “fr”;

Cheers!

Sponsor our Newsletter | Privacy Policy | Terms of Service