PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<a href="begin.htm">Begin</a><br>
Want to see more? <a href="<?php include 'more1.inc'; ?>">Click here</a><br>
<a href="second.htm">Second</a><br>
Want to see more? <a href="<?php include 'more2.inc'; ?>">Click here</a>
and so on
I need more1.inc and more2.inc to be includes because I use the contents of these files on some other places on the site as well and want an easy update.
And yes, I know I can do this with javascript 'show layers' but then I have other issues so this seemed to me an easier way - if possible that is.
The page would have to be refreshed in order to achieve what you're looking for. You could use a switch statement to determine which section of the menu should be expanded by passing a variable through the query string when you click on the link to expand the menu. You would then have your include statements for the chunks of code in the switch statement - not in the URL (which as I pointed out above, will not work). So you can use PHP to do this but you will have to have the page refresh each time a menu item is expanded or collapsed.