Help: Adding variables to include() [Solved]
Posted: Thu Jul 30, 2009 11:07 pm
I have a file called index.php that has a table with columns in it. For simplcity, let's say there are only 2 columns and let's call them column A and column B.
Column A and column B are both supposed to show some data. The layout of the data (text fields, etc.) is supposed to be the same for both columns, but the data is supposed to be different.
For example, column A and column B both show a first name and a last name, but the names are different.
I also have another file called content.php which has the layout for all the fields of the data.
What I have done is added the line of code to all the columns.
My question is, how can I pass in some sort of variable into that include so I can tell content.php how to behave?
Thanks
Column A and column B are both supposed to show some data. The layout of the data (text fields, etc.) is supposed to be the same for both columns, but the data is supposed to be different.
For example, column A and column B both show a first name and a last name, but the names are different.
I also have another file called content.php which has the layout for all the fields of the data.
What I have done is added the line of code
Code: Select all
<?php include("./content.php")?>My question is, how can I pass in some sort of variable into that include so I can tell content.php how to behave?
Thanks