Welcome Guest, Not a member yet? Register   Sign In
Hello
#3

[eluser]mdowns[/eluser]
I try to avoid globals whenever possible. You can use class members like so:
Code:
<?php

    class R{
        var $a,$b;
        function a(){

            $this->a=1;

            $this->b=2;

        }

        function b(){

            var $c = $this->a + $this->b;

            echo $c;

        }

    }

?>


Messages In This Thread
Hello - by El Forum - 03-26-2009, 12:53 PM
Hello - by El Forum - 03-26-2009, 01:05 PM
Hello - by El Forum - 03-26-2009, 01:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB