By Michsk on
Hi guys,
How would one get a $var from a function used in a module.
Lets say the googtube module. It uses a var which i would like to print in page.tpl... I have tried almost everything i can think of.
Hi guys,
How would one get a $var from a function used in a module.
Lets say the googtube module. It uses a var which i would like to print in page.tpl... I have tried almost everything i can think of.
Comments
Unless the function exposes
Unless the function exposes the variable in someway you can not access the variable outside the function. In general terms a function can exposed the value by a) returning the value, b) being passed a variable by reference, c) declaring the variable global (highly discouraged)
i tried returning it did not
i tried returning it did not work. found a work around tough without having to send the var. Thanks for you time to comment