You might be a victim of variable scope here.
Lets look at an example:
Main Script
<?php
$var = "hello there!";
include('somefile.php');
?>
Include file:
This is a piece of text that is <strong>simple</strong> HTML<br>
Now we want to insert the value into the next line<br>
This is the value: <?php echo $var; ?><br>
The above should work. When you include a file using php it merely inserts the file in line and then parses it. So it is as if the whole files is
<?php
$var = "hello there!";
?>
This is a piece of text that is <strong>simple</strong> HTML<br>
Now we want to insert the value into the next line<br>
This is the value: <?php echo $var; ?><br>
If this is not happening for you, then check your script tags they may be mismatched. Also, remeber that a varibale is only available within the scop it is declared. So if you try to use it within a function in the include file you need to declare it as global.