Hi Ray Hunter, you wrote:
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.

Well, this is clear, (I'm only new in the list - not in PHP ;-) )
but I want it in a better/shorter way
for the "master var" of a big project!

Is there a way to request such a feature and where?
I think this would be nice for application frameworks!?
Maybe also for PEAR...

Regards,
Matthias


--
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