From b0dd10f8171945e0c1f3527dd1e9d18b043e01a7 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 25 Aug 2006 17:25:49 +0000 Subject: Initial Import --- user_guide/helpers/array_helper.html | 111 +++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 user_guide/helpers/array_helper.html (limited to 'user_guide/helpers/array_helper.html') diff --git a/user_guide/helpers/array_helper.html b/user_guide/helpers/array_helper.html new file mode 100644 index 000000000..d719be9c7 --- /dev/null +++ b/user_guide/helpers/array_helper.html @@ -0,0 +1,111 @@ + + + + +Code Igniter User Guide + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +

Code Igniter User Guide Version 1.4.0

+
+ + + + + + + + + +
+ + +
+ + + +
+ + +

Array Helper

+ +

The Array Helper file contains functions that assist in working with arrays.

+ + +

Loading this Helper

+ +

This helper is loaded using the following code:

+$this->load->helper('array'); + +

The following functions are available:

+ + +

random_element()

+ +

Takes an array as input and returns a random element from it. Usage example:

+ +$quotes = array(
+            "I find that the harder I work, the more luck I seem to have. - Thomas Jefferson",
+            "Don't stay in bed, unless you can make money in bed. - George Burns",
+            "We didn't lose the game; we just ran out of time. - Vince Lombardi",
+            "If everything seems under control, you're not going fast enough. - Mario Andretti",
+            "Reality is merely an illusion, albeit a very persistent one. - Albert Einstein",
+            "Chance favors the prepared mind - Louis Pasteur"
+            );
+
+echo random_element($quotes);
+ + + + +
+ + + + + + + \ No newline at end of file -- cgit v1.2.3-24-g4f1b