summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class11
1 files changed, 11 insertions, 0 deletions
diff --git a/it.class b/it.class
index 9383d8e..aa12435 100644
--- a/it.class
+++ b/it.class
@@ -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;
+}
+
}
?>