Re: GLOBAL in function ...()

From: Date: Thu, 20 Jul 2000 16:03:19 +0000
Subject: Re: GLOBAL in function ...()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7438@lists.php.net to get a copy of this message
Hi Noor! On Thu, 20 Jul 2000, Noor Dawod wrote: > function AnotherCheck( ) { > global {all global variables}; try: extract ($GLOBALS); > > if( $a + $b == $c + $d ) { > echo "True"; > } else { > echo "False"; > } > } > > Check( ); > AnotherCheck( ); > > ?> > > Both should produce same results, even though the second function didn't > explicitly specify each variable's name in "global" definition. > also you can use $GLOBALS['a'], $GLOBALS['b'], so on. -- teodor

« previous php.general (#7438) next »