PHP: Including files dependent on each other -


two files dependent on each other:

file1:

$var1 = 'straw ' . $var2; 

file2:

$var2 = ' berry'; $var3 = $var1; 

file3:

// file should include file1 , file2 

how should 1 go including file1 , file2 in file3 in way makes sure 3 variables populated?

thank you.

you warning undefined variable regardless of order include them due design — since file 1 requires $var2 , file 2 requires $var1.

instead this:

$var2 = 'berry'; $var1 = 'straw ' . $var2; $var3 = $var1; 

you can split these in separate files long called in above order.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -