you can define your own superglobals by defining the vars first then
accessing them thru the $GLOBALS var.

example:

<?php
// file1.php
$var1 = "test1\n";
$var2 = "test2\n";
?>

<?php
// file2.php
include( 'file1.php' );

function test() {
  echo $GLOBALS['var1'];
  echo $GLOBALS['var2'];
  echo "Test\n"
}

test();

?>

That should get you started with globals.

--
BigDog


On Sat, 2003-08-23 at 11:45, Matthias Nothhaft wrote:
> Hi List,
> 
> is there a way (mybe in php5?) to define/declare a global var as a 
> superglobal, so that I can use this var like the known superglobals
> ($_GET, $_SESSION, etc.) ???
> 
> If not, is there a list for "feature requests"?
> 
> 
> Regards,
> Matthias
> 


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

Reply via email to