absArray

(/rs/public/functions.php)

absArray -- Perform abs () recursively on an array.

Description

array absArray ($a)

This function takes an array as its parameter and recursively performs abs () on any value determined to be numeric.

This function will produce an error of E_WARNING if the parameter passed is not of type array. In this case, the passed parameter is returned.

Examples

absArray (array (0, 1, -2, 3)) /* returns array (0, 1, 2, 3) */

absArray (array (array 1, -2), array (-3)) /* returns array (array (1, 2), array (3)) */

absArray (-2) /* Produces E_WARNING and returns -2 */

Related Functions

selectMember

Dependencies

None.

Function Index