1

Just a simple problem for most of you i'm sure. I have a function addTeamFixtures and it calls on a function flip.

That function is defined later in the script. But I don't think it is happy with that.

The code where it calls the function:

                $rounds[$round][0] = flip($rounds[$round][0]);

Any ideas?

More code.....

    //function to flip rounds over
function flip($match) 
{
    $components = split('v', $match);
    return $components[1] . "v" . $components[0];
}

This is the function flip, and then I have a function which has the above code inside? Am i missing something?

1
  • 2
    We probably need to see a bit more code than that. Commented May 1, 2010 at 20:53

1 Answer 1

5

You can call a function which is defined later in the script, what you can't do is call it when it is included later from another file (I guess it is your case).

So, maybe your solution would be to define it in the same file OR you will have to include it before.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.