Update. Hello Everyone, First of all, thank you all for your input. I ran a sinmple test using the suggestions you gave me and and require_once. Using firebug to test the output, I got an internal server error. I found out what the problem was. What I am doing is I have classes which represent the objects, another class containing the functions. From the function class I create an instance of each object, manipulate the information, return the HTML result. Finally I have a runner class that creates an instance of the function class, calls the function required and outputs the information. What the problem was for some reason I was did not create an instance of the function class, just was calling the function. Well by creating the runner class I solved the problem. Thanks all for your help. Regards Julian