Weird variable issue - variable not getting assigned
| From: | Jim MacDiarmid | Date: | Fri, 08 Jul 2005 15:21:01 +0000 |
| Subject: | Weird variable issue - variable not getting assigned | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-26195@lists.php.net to get a copy of this message | ||
Hi everyone,
I have a very puzzling variable issue going on where I have a function in a
class (Database class) that returns the output of a query from my users
table. In the calling function of another class (session class), I am trying
to assign each element of the received array to a variable declared at the
top of my class, such as this scaled down example:
Class session{
var $userinfo;
var $username;
var $userid;
$this->userinfo = $db->GetUserInfo($_SESSION['username']);
$this->username = $this->userinfo['username'];
$this->userid = $this->userinfo['userid'];
};
I know I'm getting data back in my array. I have a running trace log. I've
determined that I can do an assignment such as:
$this->username = "testusername";
Something is preventing the assignment from the array for some reason.
Any ideas?
TIA,
Jim