All,
I know that '->' is used in object oriented PHP, but I saw this in the
Moodle code (www.moodle.org)
$CFG->dbtype = 'mysql'; // mysql or postgres7 (for now)
$CFG->dbhost = 'localhost'; // eg localhost or db.isp.com
$CFG->dbname = 'moodle'; // database name, eg moodle
$CFG->dbuser = 'root'; // your database username
$CFG->dbpass = 'mypassword'; // your database password
$CFG->prefix = 'mdl_'; // Prefix to use for all table names
You can "echo $CFG->dbtype;" and get "mysql"
This isn't calling functions from an object, rather seems to be
applying properties to a new "object"??? There is no $something = new
ClassName, so This is what I figure.
Its been a while since I cooded PHP and have never seen this. This
seems like a realy good way to apply a number of atttribs to a
"variable" without having to create an array -- unless that is a
shorthand way of creating an array...
Thanks
-Wes Yates