I am trying to call a variable to add to an array within a class, but I keenp getting unexpected T_VARIABLE error when I try.
class MB_API {
$SName = 'Test';
$PWD = 'test';
$SiteID = '10';
protected $client;
protected $sourceCredentials = array(
"SourceName"=>$SName,
"Password"=>$PWD,
"SiteIDs"=>array($SiteID)
);
};
The variables can be set within the class or outside, it doesn't really matter. They will be set by a pull from a database.