Weird variable issue - variable not getting assigned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux