How to get a var into a var, Example:
$gameid = 5;
$game{$gameid} = active;
So, I want var $game5 to be set to active.
How to do this?
Thanks.
Greetings. Jonathan
How to get a var into a var, Example:
$gameid = 5;
$game{$gameid} = active;
So, I want var $game5 to be set to active.
How to do this?
Thanks.
Greetings. Jonathan
$gameid = 5;
${"game" . $gameid} = "active";
echo $game5; //Echoes Acive