Given the following code:

<script language="php">

  function function1() {
  
    global $bob;
    
    echo "Bob = $bob\n";
  
  }

  function function2() {
  
    $GLOBALS[bob] = "Joe Bob Briggs";
    
    function1();
  
  }
  
  function2();

</script>

function1() can echo out the value of $bob because it is
added to the global namespace in function2().  Is it possible
for function1() to access the variables that were defined in
the function2() namespace?  Like some sort of "limited"
global or something?  Something to allow called functions
access to the variable namespace of the calling function?

thnx,
Chris


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

Reply via email to