Passing variables between functions
-
Ok, Cleary im missing something obvious here but I cant see it, PHP aint my strong point. I’ve created a plugin that accepts values when the user inputs them into a widget, I need those values to be put into one function from another.
So basically what im asking is how do yo go about passing variables between functions?
Simplified it looks a bit like this.
function get_variable($variable){ $example = new example_class(array ( 'example' => array('test',$variable,'test'), )); } function execute_variable(){ $variable = 'test'; }
The topic ‘Passing variables between functions’ is closed to new replies.