I wish to pass a session variable into an object and have it available as an attribute. I have what I thought I needed below as a code segment but it douse no work. Has anybody got any idea how I should achieve this.

Ben

......

class Contacts{

        var $db;
        array $SESSION;

function Contacts( $SESSION, $db ) {

                $this->$SESSION = $SESSION;
                $this->$db                      = $db;

}

......

****************************************************************
* Ben Edwards           Tel +44 (0)1179 553 551  ICQ 42000477  *
* Homepage - nothing of interest here   http://gurtlush.org.uk *
* Webhosting for the masses         http://www.serverone.co.uk *
* Critical Site Builder    http://www.criticaldistribution.com *
* online collaborative web authoring content management system *
* Get alt news/views films online   http://www.cultureshop.org *
* i-Contact Progressive Video      http://www.videonetwork.org *
* Fun corporate graphics             http://www.subvertise.org *
* Bristol Indymedia               http://bristol.indymedia.org *
* Bristol's radical news             http://www.bristle.org.uk *
****************************************************************

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

Reply via email to