think of an included file as if it were part of the parent code. so
file1.php <? echo $foobar; ?> file2.php <? $foobar = "hello world"; include "file1.php"; ?> file2.php would basically be: <? $foobar = "hello world"; echo $foobar; ?> HTH Martin -----Original Message----- From: Pax [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 9:24 AM To: [EMAIL PROTECTED] Subject: [PHP] includes and variables I am trying to separate html from php code. For more complicated pages I intend to generate classes..but before I start doing that is there a quick way to include html code that contains variables ? if the main page has already defined those variables, are they going to be automatically replaced? In the above situation does the file to be included needs to contain <? ?> ? Thanks Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php