note 107100 deleted from function.include by danbrown

From: Date: Mon, 09 Jan 2012 18:30:43 +0000
Subject: note 107100 deleted from function.include by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-185487@lists.php.net to get a copy of this message
Note Submitter: Harry_Hobson ---- test.php : //// simple example on how to pass variables to and from an include page <?php include("vars.php"); $gg=11; $hello = new SampleClass();//calls the class $hello->includepass($gg); // calls the function within the class $gg=$hello->gg; //calls the variable from vars.php echo "$gg"; ?> vars.php : <?php function passpass() { return 5; } class SampleClass { public function includepass($gg) { $tt = passpass();//calling above function $gg=$gg + $tt ; $this->gg=$gg;//pass back to test.php } } ?>

« previous php.notes (#185487) next »