Hello,
I've rewritten my class as you told me:
----------------------------------------------------------
class returnConfigParams
{
private static $instance = NULL;
var $a;
var $b;
var $c;
var $d;
private function __construct() {
}
// function that get the database parameters from "properties.php"
public static function getInstance() {
if (!self::$instance)
{
/*** set this to the correct path and add some error checking ***/
include($_SERVER['DOCUMENT_ROOT']."/properties.php");
self::$instance = array($a, $b, $c, $d);
}
return self::$instance;
}
private function __clone(){
}
}
----------------------------------------------------------
and i'm calling it with
returnConfigParams::getInstance(); (probably wrongly)
The question is how to access the individual elements of the array.
Can someone help me please ?
Cheers,
AR
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php