[PHP] Using $$ to access a variable

2001-07-23 Thread usenet5
Please forgive my probably newbie question... I am cycling thru my database using a SQL describe statement and then am getting values from a form based upon the field name I find. This is working up 'til I try to read the form data. I have defined a variable like this: $var =

Re: [PHP] Using $$ to access a variable

2001-07-23 Thread Steve Edberg
I'm not sure that your construct will work; however, you could always do echo $HTTP_POST_VARS[$table_array[$iCnt][0]]; in place of 'echo $$var' or $var = 'HTTP_POST_VARS'; echo ${$var}[$table_array[$iCnt][0]]; When using variable variables, the array index - here,