Sussagittikasusa Sussagittikasusa - 4 years ago 128
PHP Question

How to define global functions in PHP

How to define a global function which would be accessible from any page?

Answer Source

In include.php:

function myGlobalFunction() {
    // do someting

Then in every page you want to use it:

include 'include.php';
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download