yeah like both you said, and the above poster, its pretty much like cutting and pasting the contents of into the parent file
the exceptions are:
php automatically drops out of php parsing mode as soon as it gets to the included code. thats why you must have valid <?php ?> tags in the included file as well
you can also use the return statment inside a file which has been included
the return statement acts just like in a function. php immediately stops parsing and returns to the script/code which called it origionally
<?php
$foo = true;
$fav_color = include('favcolor.php');
echo "the included file sais that its favorite color is: $fav_color";
?>
<?php
// favcolor.php
if ($foo) {
return 'green';
} else {
return 'red';
}
?>