Here's another option as well, in case it helps out: $var1 = "Pizza"; $var2 = "var1"; $var3 = $$var2;
print "var3 = $var3<br>"; Output: var3 = Pizza > -----Original Message----- > Ok, assuming everything's working correctly except for the use of > $prevtime in the SESSION, then here's one answer: > > Yes, you can name a session the way you described. If you're having > trouble with doing the concatenation of values inside $_SESSION, then > try combining them outside: > > $roomname="sampleroom"; > $sessionname = $roomname . $prevtime; > $_SESSION[$sessionname]=time(); > > > Secondly, looks like you forgot a "$" on prevtime below: > $_SESSION["$roomname" . "prevtime"]=time(); > > Thirdly, you can store arrays in $_SESSION as well, so you could divide > the rooms up that way: > > $_SESSION[$roomname]["PrevTime"] = $prevtime; > > > -TG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php