Mozilla Skin
BLOG     |     MY EYEOS     |     PROFESSIONAL SERVICES     |     OPEN SOURCE PLATFORM

Lib eyeSessions addArrayValueByKey

From eyeOS Wiki

Contents

Syntax

eyeSessions('addArrayValueByKey', array($varName, $varValue, $key))

or

reqLib('eyeSessions', 'addArrayValueByKey', array($varName, $varValue, $key))

Description

Adds a new value to the array session variable varName. The value is inserted as an associative array, being the key of the new element the 'key' argument.

Arguments

varName: name of the array variable in where a new value must be inserted.

varValue: value to be inserted in the session variable.

key: key of the new element added to the array. In case no key is specified, the result obtained with this function will be equivalent as if the addArrayValue() function is used.

Return values

None.

Example

eyeSessions('addArrayValueByKey', array('myArray', 42, 'myKey'));