note 64835 deleted from language.oop by bjori

From: Date: Fri, 21 Apr 2006 14:15:43 +0000
Subject: note 64835 deleted from language.oop by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-108930@lists.php.net to get a copy of this message
Note Submitter: cyrus at uw dot hu Reason: useless ---- Hi! its an example... function in function with class :) <? class exmpl{ var $things; var $thing; function add($id, $db) { $this->things[$id] += $db; } function vizsgal($id){ if($this->things[$id] == 1){ $this->thing[$id] = "its one"; }else{ $this->thing[$id] = "its zero"; }// else end }// else end function kiir2($id){ $this->vizsgal($id); $out = $this->thing[$id]; return $out; }// func end } $test = new exmpl; $test->add("1", 1); // $thing[1] = 1 $test->add("2", 1); // $thing[2] = 1 $test->add("3", 0); // $thing[3] = 0 $x = $test->kiir2(1); print $x; ?> // kiir2(1) => its one ---> $thing[1] = 1 // kiir2(2) => its one ----> $thing[2] = 1 // kiir2(3) => its zero ----> $thing[3] = 0 // its just a simple easy sample...

« previous php.notes (#108930) next »