Hopefully simple problem to solve. I have the main file which has a function in, this file then includes another file. Within this second file is the call to the function. However I get the error below.

Main File:

```
function sample() {
  echo "hello world";
}

```

Secondary file called by the main file 

```
sample();

```

Error given

```
Fatal error: Call to undefined function sample() in [path hidden].php on line 20

```