Hi All,
Got a little question, new to this PHP but rather enjoying it. My books dont seem to cover this however.
Gist -
I am building an "index.php"
It contains a table with three rows and two columns.
top row = header
middle row, left column = navigation
middle row, right column = content (as per navigation)
bottom row = footer
I have a whole host of HTML based navigation scripts from previous HTML based projects, I would like to use these along side my growing knowledge of PHP. In my current situation I am building a site for a friend, and he 'wants' a particular HTML/JS based menu (cos he likes the way it looks)... I cannot code the same thing in PHP without spending more time than I have to learn PHP at a deeper level (something for after this project).
- Back to the subject:
The content of the middle row, right column should be
include($navigation_variable);
$navigation_variable is ultimately a file similar to the header and footer files I am already including in the displayed table in the index.php. However, I am competent enough in other PHP areas to have this pull info from a MySQL database (already got catalog type apps working from learning about the code).
When it comes to assigning different values to the $navigation_variable in the <a href....>text</a> HTML tags I have in my navigation script I am having problems
In the statement "<a href=....>text</a>" how would I assign a different PHP value to the "href=" section?
With this knowledge I believe in the "middle row, right column" I can then use "include($navigation_variable);" (formatting this so it becomes a file name) to display different content, as per clicked links on the navigation script.
I think I am looking for something like:
<a href=$navigation_variable>text</a>
Currently I am getting an "Object not found" message from my navigation selections.
Any help muchly appreciated