Brimbox Logo Brimbox Version 2.3.4 Released

init>>

Method to initialize a variable with a default if variable is not set.

Class: bb_work, called as $main

File: bb_work.php (php)

Declaration:

function init(&$var, $default)

Usage:

$main->init($var, $default);

Sets $var, which is passed by reference, to $default if $var is not set.

This works with the the PHP function isset.

Parameter: $var (mixed)
The variable to be initialized.

Parameter: $default (mixed)
The variable used for initialization if $var is not set.

Updated: 2016-07-07