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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically call function with variable value

Status
Not open for further replies.

Qik3Coder

Programmer
Jan 4, 2006
1,487
US
I am at work so i dont have the exact code with me, but what i am trying to do is this:

I have the function declared previously, and the declaration of the variable name is controlled.

Code:
Var functionName = "box" + "Collision";
$functionName();

Any help would be appreciated.

SWM Programmer Seeking 3d Modeling work. Either for long term commitment or just friendship. Likes long hours in front of a flat screen with heavy doses of Mountain Dew.
 
Thanks guys, i think i tried those, lemme try again, over teh weekend i just wrote out the switch i was trying to eliminate.

SWM Programmer Seeking 3d Modeling work. Either for long term commitment or just friendship. Likes long hours in front of a flat screen with heavy doses of Mountain Dew.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top