I am trying to figure out how to use a variable in an array that has been read from a file. This is what I have thus far and it is returning the variable name instead of the value. The example intentionally does not have a space between $var.doe and saint.$var AND places the $var in front of "doe" and behind "saint" because that is the actual data we are dealing with. Thank you for your help.
read.txt
$var.doe
saint.$var
php file
<?
$var = "john";
$aArray = file('read.txt');
echo $aArray[0];
echo '<br>';
echo $aArray[1];
?>