Hi,
I am processing the input from a web form:
Variables are named as follows:
data1
data2
data3
I am using a loop to process the data.
$_POST[data.$y]
I don't think this is quite right though - how do I use the value of a variable in a variable name.
Thanks,
Variable Question
Moderator: General Moderators
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: Variable Question
Code: Select all
<?php
$_POST['data' . $y];
?>“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm
Re: Variable Question
Thanks