• I am having a problem with my single.php understanding variables defined in a post.

    For Example:

    I have made a post using Exec-PHP and include something like
    <?php $background = "yes"; ?>

    Then in my single.php I have a code like

    <?php
    if($background == "yes")
    echo "test";
    ?>

    For some reason the single.php does not understand what the variable $background is. Am I doing something wrong?

Viewing 1 replies (of 1 total)
  • <?php
    global $background;
    $background = "yes";
    ?>
    <?php
    global $background;
    if($background == "yes")
    echo "test";
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘PHP EXEC-PHP Single.php’ is closed to new replies.