summaryrefslogtreecommitdiffstats
path: root/user_guide/helpers
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-20 23:13:26 +0200
committeradmin <devnull@localhost>2006-09-20 23:13:26 +0200
commite348efb92de213fcfbc312993d8b21a30eb280c0 (patch)
treec9e8f65a883208448c01813eb300277f9773030c /user_guide/helpers
parent480da81d6111a5c1faf4433707ee8d3b3de8031e (diff)
Diffstat (limited to 'user_guide/helpers')
-rw-r--r--user_guide/helpers/array_helper.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/user_guide/helpers/array_helper.html b/user_guide/helpers/array_helper.html
index d719be9c7..4ab83da69 100644
--- a/user_guide/helpers/array_helper.html
+++ b/user_guide/helpers/array_helper.html
@@ -73,6 +73,21 @@ Array Helper
<p>The following functions are available:</p>
+<h2>element()</h2>
+
+<p>Lets you fetch an item from an array. The function tests whether the array index is set and whether it has a value. If
+a value exists it is returned. If a value does not exist it returns FALSE, or whater you've specified as the default value via the third parameter. Example:</p>
+
+<code>
+$array = array('color' => 'red', 'shape' => 'round', 'size' => '');<br />
+<br />
+// returns "red"<br />
+echo element('color', $array);<br />
+<br />
+// returns NULL<br />
+echo element('size', $array, NULL);
+</code>
+
<h2>random_element()</h2>