joined:June 1, 2007
Hey all, I am looking for some info on using a variable when calling a function.
Lets say I have two functions
function linkPaypal and function link2checkout
I have no issue calling the function like $x = linkPaypal(..); or $x = link2checkout(...); but what I want to know is can I make the function call dynamic so depending on the way a variable $vendor is set determines the actual function that is used ie
$vendor = 'Paypal'; then the call can be setup as
$x = link$vendor (item1,item2,etc);
which would call the linkPaypal function and return the appropriate info.
Thanks for any help.