diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -642,6 +642,17 @@ function date($format = "", $stamp = null) return date($formatstring, $stamp); } + +function map($expr, $arr) +{ + $func = create_function('$k,$v', "return $expr;"); + + foreach ($arr as $k => $v) + $result[$k] = $func($k, $v); + + return (array)$result; +} + } ?> |