session variables in functions....

From: Date: Tue, 20 Nov 2001 10:54:14 +0000
Subject: session variables in functions....
Groups: php.general 
Request: Send a blank email to php-general+get-75224@lists.php.net to get a copy of this message
Somebody knows why I cannot reach the $HTTP_SESSION_VARS in a function .... For example, why does this not output the "en-US" string three times: <? session_register("LangID"); $HTTP_SESSION_VARS["LangID"] = "en-US"; echo($HTTP_SESSION_VARS["LangID"]); echo("**"); function CurrentLang(){ $language = $HTTP_SESSION_VARS["LangID"]; echo($language); } CurrentLang(); echo("**"); echo($HTTP_SESSION_VARS["LangID"]); ?>

« previous php.general (#75224) next »