Welcome Guest, Not a member yet? Register   Sign In
static variable - problem
#1

[eluser]penta997[/eluser]
I have a test function:
Code:
function test()
        {
            static $x = 0;
            $x++;
            echo $x;
        }

and when I call this function, $x still equals 1, the static don't work. Please, help


Messages In This Thread
static variable - problem - by El Forum - 01-25-2011, 05:02 PM
static variable - problem - by El Forum - 01-25-2011, 05:28 PM
static variable - problem - by El Forum - 01-25-2011, 05:33 PM
static variable - problem - by El Forum - 01-25-2011, 07:47 PM
static variable - problem - by El Forum - 01-26-2011, 04:44 AM
static variable - problem - by El Forum - 01-26-2011, 04:51 AM
static variable - problem - by El Forum - 01-26-2011, 04:55 AM
static variable - problem - by El Forum - 01-26-2011, 05:32 AM
static variable - problem - by El Forum - 01-26-2011, 05:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB