currently I have the following code

inside my 'function.php' is

```
function calcTime($database_name,$currentTime){

    global $startTime;
    global $endTime;

    ...calcutions

    return $startTime;
    return $endTime;
}//end calcTime()

```

inside my main 'index.php' I have

```
include('/function.php');

$databaseName = foo;

$currentTime = 12.30;

function begin($database_name,$currentTime){

    ...some calculations

    calcTime($database_name,$currentTime); //calling the function from other file

echo $startTime;

echo $endTime;

}// end begin()

```

The problem I am having is that the variables that are declared inside the inner function do not pass through to the outer function. I have declared the variables globals and returned them. Not sure whats going on.

something interesting though, if I echo calcTime($database\_name,$currentTime); the $startTime is returned but not $endTime. 

Please help. I have functions that are used throughout other functions that I would like to use in this fashion. Thank you!!