diff options
author | Urban Müller | 2008-07-15 14:44:27 +0000 |
---|---|---|
committer | Urban Müller | 2008-07-15 14:44:27 +0000 |
commit | f1a90f3fb6effcb1d3a5e59e9c138fa005c3cf98 (patch) | |
tree | a5ed861741df64db67a0a02b92234e6e596c4939 /it.class | |
parent | 2e60e282a8de8f97effd98ea2deeea26929be52a (diff) | |
download | itools-f1a90f3fb6effcb1d3a5e59e9c138fa005c3cf98.tar.gz itools-f1a90f3fb6effcb1d3a5e59e9c138fa005c3cf98.tar.bz2 itools-f1a90f3fb6effcb1d3a5e59e9c138fa005c3cf98.zip |
nicer argument names
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; |