Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reference he**

Status
Not open for further replies.

bardley

Programmer
May 8, 2001
121
US
OK, so I have a variable number of POST variables coming into a form handler from another script. These names are a subset of, say, var1, var2, ..var1238.

I know which subset I will have, so I know what numbers will be on the end, and I loop through the possible values, setting $varname = 'var'.$index, and then I can access the value of that POST variable by $$varname.

But pretend for a second I have a function that expects a reference to a variable (normally &$varname), and I need to pass each of these variables as arguments to this function.

How please?

Many TIA!!! Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com
 
Well... what happens when you try to pass your variable variables: function(@$$varname), or even function(@${$varname})? I am curious myself.

Spend some time at the following pages:
-------------------------------------------

"Calculus is just the meaningless manipulation of higher symbols"
                          -unknown F student
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top