Dronealone
IS-IT--Management
Hello,
I am trying to dynamically build a variable name and then access the value that is in the variable, which has been posted by a form. My code is:
$var = "HTTP_POST_VARS[industry" . "_" . $db_row[name] . "]";
$val = $$var;
echo $val;
This doesn't give me any value. If I echo the variable name, which is being constructed correctly, I get the value. Does anybody know what I'm doing wrong?
Thanks!
I am trying to dynamically build a variable name and then access the value that is in the variable, which has been posted by a form. My code is:
$var = "HTTP_POST_VARS[industry" . "_" . $db_row[name] . "]";
$val = $$var;
echo $val;
This doesn't give me any value. If I echo the variable name, which is being constructed correctly, I get the value. Does anybody know what I'm doing wrong?
Thanks!