[wp-hackers] Variable Scope

Chris Poteet cpoteet at siolon.com
Tue Mar 11 01:39:30 GMT 2008


I want to have a wider scope for variables in my plugin, but for some
reason it's not working.  For instance:

$variable = get_option('variabletest');

function dummy() {
    global $variable;
    echo $variable;
}

Neither of those work.  Am I doing something wrong (I must be).


More information about the wp-hackers mailing list