Johnt wrote:
function foo() {
    static $a;
    $a++;
    echo "$a<BR>";
 unset($a);
}

foo();
foo();
foo();
///////////////////////////////////////////////

*******  RESULT ********
1
2
3
************************
Should it be all 1's at this time?

Is it the code, function, or my php setup..any idea ???


I thought the purpose of unset was to remove positions inside arrays. Not sure if it was intended for simple variables. I've used it for checking isset like this:

unset ($_POST[...
isset ($_POST[...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to