Connecting Tech Pros Worldwide Help | Site Map

Getting this to work: $_POST[$val["vname"]];

Keiron Waites
Guest
 
Posts: n/a
#1: Jul 17 '05
I'd like to access $_POST["variablename"] where $val["vname"] is the
variable name. $_POST[$val["vname"]]; gets an error message:

Parse error: parse error, unexpected '[', expecting ',' or ';' in
C:\Documents and
Settings\ShepMode\Desktop\Websites\CGLD.net\Web\ch eckform.function.php on
line 8

Is there any way to do what I'm trying to do?


Jon Kraft
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Getting this to work: $_POST[$val["vname"]];


Keiron Waites <webmaster@-NOSPAM-sharemonkey.com> wrote:
[color=blue]
> I'd like to access $_POST["variablename"] where $val["vname"] is the
> variable name. $_POST[$val["vname"]]; gets an error message:
>
> Parse error: parse error, unexpected '[', expecting ',' or ';' in
> C:\Documents and
> Settings\ShepMode\Desktop\Websites\CGLD.net\Web\ch eckform.function.php on
> line 8[/color]

Shouldn't be any problem and works here - could you post the complete code
section?

JOn
Closed Thread


Similar PHP bytes