I can successfully populate the params array in this way:
class MyDB extends DB {
var $params = array( 'phptype' => "mysql",
'hostspec' => "localhost",
'database' => "testdb",
'username' => "root",
'password' => "" );
}
Then I try to do it this way:
class MyDB extends DB {
var $params = array();
$this->params['phptype'] = "mysql";
$this->params['hostspec'] = "localhost";
$this->params['database'] = "testdb";
$this->params['username'] = "root";
$this->params['password'] = "";
}
I get this error for the second way:
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or
`T_VAR' or `'}'' in c:/apache/htdocs/004.php on line 15
Line 15 is this line: $this->params['phptype'] = "mysql";
I also tried populating the array by dropping $this-> and just having
$params['phptype'] = "mysql"; but I still get the same error.
Anybody know why I am getting this error?
Regards,
Paul
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]