Hi...
I am trying to use a variable AS a variable (I think it's called Variable variable). I tried the methods shown on php.net, but was unable to get the results. I am not even sure if what I want can be achieved. Here's the situation.
I've a site of our (say) baseball club.
I've a file called variables.php, which stores many variables, including player names in the following format:
$bob = "Bob Smith";
In the profiles section of my site, it should display Bob's profile when someone clicks on:
http://www.mysite.com/profiles.php?name=bob
I want to use $name (which has the value of "bob" right now) in Bob's profile so that it shows "Bob Smith" in the TITLE of his profile page.
I tried:
$title = "${$name}";
and
$title = "$$name";
but I couldn't get it to work.
I hope I am not asking for impossible, but I'd still be interested to know even if it is impossible.
Please help if you can. Any alternatives would be fine too.
Thank you.
Mehul