Two files are dependent on each other:
FILE1:
$var1 = 'Straw ' . $var2;
FILE2:
$var2 = ' berry';
$var3 = $var1;
FILE3:
// this file should include FILE1 and FILE2
How should one go about including FILE1 and FILE2 in FILE3 in a way that makes sure the three variables are properly populated?
Thank you.
Since FILE 1 contains
variableused in FILE 2, FILE 1 should beincluded first in FILE 3. So FILE 3 would be something likeBut since the variables are dependent on each other, why not have them in the same file unless you have a reason some how.
NOTE:
var2would be undefined in FILE 1. So my advice is to put both variables that are dependent on each other in one FILE. So FILE 1 an be something likeThen FILE 2
Then you
includeas above.