From f5aef42dbb9df2cf75f29aeb875a59cea6e83ceb Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 30 Mar 2005 01:25:50 +0000 Subject: [PATCH] Allow ISSO::funct::rand() to take array(LOW VAL, HIGH VAL) just like rand() normally would. --- functions.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index a136344..0cd6abe 100644 --- a/functions.php +++ b/functions.php @@ -289,9 +289,14 @@ class Functions */ function rand($length = 0) { - // Gimme a length! - if (!$length) + // custom high and lows + if (is_array($length)) { + $length = rand($length[0], $length[1]); + } + else if (!$length) + { + // Gimme a length! $length = rand(20, 65); } -- 2.43.5