Re: Question about variables
| From: | Jeroen Latour | Date: | Wed, 05 Jul 2000 18:30:10 +0000 |
| Subject: | Re: Question about variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5028@lists.php.net to get a copy of this message | ||
At 14:18 5-7-2000 -0500, you wrote:
Question about variables.... I've read the docs and my ref book, frankly I'm a little confused. If I start a php script on page 1.php3 and use an include to incorp a file of defined variables, database name, pass word etc and 1.php3 sends the script to 2.php3 and 2.php3 sends the rest of the excecution to either 3.php3 or 4.php3 (through includes)...if I'm reading the docs right, the orginal defined variables should still be available with their values in the third and fourth pages. Is this correct..I don't have to include the orginal variable list in page 3 or 4.You might have to make them global, so: in 1.php3 global $var1,$var2; $var1 = "Test"; $var2 = 3; in 3.php3 global $var1,$var; echo "Var 1: $var1, Var 2: $var2"; That should work either way.... Jeroen Latour
ken -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net