From e348efb92de213fcfbc312993d8b21a30eb280c0 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 20 Sep 2006 21:13:26 +0000 Subject: --- user_guide/helpers/array_helper.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'user_guide') 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

The following functions are available:

+

element()

+ +

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:

+ + +$array = array('color' => 'red', 'shape' => 'round', 'size' => '');
+
+// returns "red"
+echo element('color', $array);
+
+// returns NULL
+echo element('size', $array, NULL); +
+

random_element()

-- cgit v1.2.3-24-g4f1b