WordPress.org

Support

Support » Plugins and Hacks » runPHP Variables

runPHP Variables

  • The readme file for runPHP plugin says:
    **************
    Code executed by runPHP is *not* in the global scope. It is executed as if
    it were inside a function block and so you’ll need to declare your
    globals accordingly.
    **************

    I’d be happy to do this but I don’t know what they mean and I’m having trouble finding out how to make my variables work. If I use this code:
    *************
    $value==1;
    if ($value==1)
    {
    echo”Value equals 1″;
    }
    else
    {
    echo”Value equals nothing”;
    }
    ************

    I get “Value equals nothing”.

    So it’s running the php code but not using my variable.

    I know there’s a simple answer I just can’t find it.

    No, I’m not a PHP expert (obviously) but I have used it successfully many times.

    Thanks,
    Bob

  • The topic ‘runPHP Variables’ is closed to new replies.