Jump to content

variables in variables? is this possible


mattm1712

Recommended Posts

hi im  pretty new to php have been teaching myself, i have come to a problem

i have an index page where i have 4 variables 1 2 3 4 each with include pages in so i click a link in my menu and it changes the body page to 1 of the 4 variables, but now i want to create a page with varibale in.

 

so i say i click a link on my index page its goes to  index.php?variable=2    but on that page i want titles where u click them and it loads a page within that page.

 

does any1 understand? lol

please help

 

matt

Link to comment
Share on other sites

This isn't anything to do with variables in variables?

 

Do you mean..

switches, what these are..

case default:

would be the main case for eg: page.php

case "test":

would be another case for eg: page.php?act=test

Wherever your case is, is where the content will be displayed, all your headers and stuff would stay the same.

 

You'll have to post some code too.

PHP.net Switch

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.