WordPress.org

Ready to get started?Download WordPress

Forums

runPHP Variables (1 post)

  1. chamster
    Member
    Posted 7 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.