I have a function that gets a value from the database and returns it. I call the function to store it into a member variable but I get the following error:
Parse error: parse error, expecting `','' or `';'' in I:\wamp\www\deposit\classes\Site.php on line 14
This is the line that causes the error
public static $depositmoney = self::get_balance();
And this is the function that gets the value from the database
public static function get_balance()
{
global $link, $usertable, $userid, $useridentify;
//query current balance
$cb = mysqli_fetch_object(mysqli_query($link, "SELECT deposit FROM ".$usertable." WHERE ".$userid."=".$useridentify.""));
return $cb->deposit;
}//end of function get_balance().
all of this code is in the same class. Anyone an idea of what's causing the error?