Re: Variables problem
| From: | Chris Lee | Date: | Mon, 19 Mar 2001 14:28:46 +0000 |
| Subject: | Re: Variables problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-44577@lists.php.net to get a copy of this message | ||
I dont know how good of an idea it is to have 180 variable variable names. oi, headache. but the
question you asked was this.
" $q = 'tar1-1' how do I access the variable $tar1-1 "
no problem
echo $$q;
--
Chris Lee
lee@mediawaveonline.com
""Per Kallin"" <per@kallin.nu> wrote in message news:98va5j$3lp$1@toye.p.sourceforge.net...
Hi!
I have a quite big form to fill out a calendar. The form has six fields for
every day in a month to make it possible to set up tree apointments (the
target of the meeting and Locataion), this makes a total of about ~180
fields so I created them with a for-loop.
Now I got this 180 fields named tar1-1, loc1-1, tar2-1, loc2-1 a.s.o. where
the first tree letters tells what information it is, the 4th witch meeting
it is (1-3) and the digits after the minus-sign tells the day of the month
(1-31)
The problem is to get the value out of the variable so i can store it in my
mySQL database. it no problem to create a variable that holds the name of
the variable that contains the data, but then??? The value of the variable
$q is 'tar1-1' and I want to access the variable $tar1-1.....
I can't find any way to solve this, can you? Someone most have created a
calendar like this before...
Please respond to per@kallin.nu
/Per Kallin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net