Making variable global / accessing variable

From: Date: Sun, 30 Sep 2001 17:26:19 +0000
Subject: Making variable global / accessing variable
Groups: php.general 
Request: Send a blank email to php-general+get-69370@lists.php.net to get a copy of this message
Hello! How can I make a variable, which name I give to a function, global in this function? I want to make something like: function MyFunc($sVarName) { GLOBAL [$sVarName]_error, $sVarName_ok; .... } So if $sVarName = "sHello", I want to access $sHello_error and $sHello_ok in this function. Any idea how I can make this variable gloabl and whats the easyst way to access this var then? Martin

« previous php.general (#69370) next »