Page 1 of 1

Function usage

Posted: Wed Oct 28, 2009 7:21 am
by howard555
How do I make user defined functions available to multiple scripts ?

Everything I have seen on functions implies that they are used only in the script which contains them, which is not very useful, unless you have a repetitive task in that script.

I would like to use my functions in the same manner as PHP's built-in ones.

Thanks,

Re: Function usage

Posted: Wed Oct 28, 2009 7:41 am
by Mark Baker
Put your functions in a separate .php file (e.g functions.php)
And include that file at the top of each script that needs to use any of the functions