Guest User

Untitled

a guest
Apr 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1.  
  2. class TestClass
  3. {
  4. public $foo;
  5. public $language;
  6.  
  7. //tar man bort // funkar det ej :S
  8. //$this->language = $_SESSION['language'];
  9.  
  10.  
  11. public function __construct($foo) {
  12. $this->language = $foo;
  13. $this->disp($this->language);
  14. }
  15.  
  16. public function disp($what){
  17. echo $what.' '.$this->language;
  18. }
  19.  
  20. }
  21.  
  22. $class = new TestClass($_SESSION['language']);
Add Comment
Please, Sign In to add comment