summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2008-06-20 19:18:49 +0000
committerUrban Müller2008-06-20 19:18:49 +0000
commit4f531ee59521e4bd10fca1010e22d88066b43620 (patch)
tree4799e71a416c432c23d9cfc3f8d4fddb390534a7 /it.class
parent5a680aa8325deb278f97dcb24548b0802c5fdb7f (diff)
downloaditools-4f531ee59521e4bd10fca1010e22d88066b43620.tar.gz
itools-4f531ee59521e4bd10fca1010e22d88066b43620.tar.bz2
itools-4f531ee59521e4bd10fca1010e22d88066b43620.zip
it::map docs
Diffstat (limited to 'it.class')
-rw-r--r--it.class5
1 files changed, 5 insertions, 0 deletions
diff --git a/it.class b/it.class
index aa12435..6fc2d9c 100644
--- a/it.class
+++ b/it.class
@@ -643,6 +643,11 @@ function date($format = "", $stamp = null)
return date($formatstring, $stamp);
}
+/**
+ * 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
+ */
function map($expr, $arr)
{
$func = create_function('$k,$v', "return $expr;");