diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -645,14 +645,14 @@ function date($format = "", $stamp = null) /** * Iterate over an array, replacing every element by expression - * @param $expr The expression to apply, may contain $k for keys and $v for values - * @param $arr The array to iterate over + * @param $expression The expression to apply, may contain $k for keys and $v for values + * @param $array The array to iterate over */ -function map($expr, $arr) +function map($expression, $array) { - $func = create_function('$k,$v', "return $expr;"); + $func = create_function('$k,$v', "return $expression;"); - foreach ($arr as $k => $v) + foreach ($array as $k => $v) $result[$k] = $func($k, $v); return (array)$result; |