0

I have a class and inside the class I have a public static set as

public static $salt = '*nW5@Ipn(rXRPUy4KJMFK!o&HY4iOeAF0@CM!96X';

I need to rather query a DB, fetch the "key" from the result and set that result to the public static $salt

I am getting to the point where the DB connection is made, the result is found but I just don't know how to set the result the to the public static $salt

Any help much appreciated.

Dan
  • 10,614
  • 5
  • 24
  • 35
  • 2
    Possible duplicate of [Dynamically populating a static variable in PHP](http://stackoverflow.com/questions/6024282/dynamically-populating-a-static-variable-in-php) – Dan Dec 11 '15 at 22:43
  • An interesting solution: http://stackoverflow.com/questions/693691/how-to-initialize-static-variables/4470002#4470002 – Dan Dec 11 '15 at 22:50

0 Answers0