28.4.2. Functions

Here is an example of a simple PHP function:

function get_lang($module) {
  global $currentlang, $language;
 
  HERE GOES THE FUNCTION CODE
}

It has the following structure, common to every PHP function:

Functions may be called from anywhere in the PHP code. See also PHP functions.


Help us make a better PHP-Nuke HOWTO!

Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum!

Chris Karakas, Maintainer PHP-Nuke HOWTO