Sunday, March 20, 2011

Cannot access empty property PHP

Don't use the '$' when accessing a member variable. i.e.:

Wrong:
$MYTHING->$dbhost = 'localhost';

Correct:
$MYTHING->dbhost = 'localhost';

No comments:

Post a Comment