From 2c6b660b34f1444d8469c118a5d357f8495e87d0 Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Tue, 10 Jul 2001 01:10:36 +0000 Subject: [PATCH] Add note toi range() function git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@51038 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/array.xml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/functions/array.xml b/functions/array.xml index 95ccea4602..996848db5b 100644 --- a/functions/array.xml +++ b/functions/array.xml @@ -2688,19 +2688,28 @@ Array inclusive. If low > high, the sequence will be from high to low. - <function>range</function> example + <function>range</function> examples foreach(range(0,9) as $number) { echo $number; } foreach(range('a','z') as $letter) { echo $letter; +} +foreach(range('z','a') as $letter) { + echo $letter; } + + + Prior to version 4.0.7 the range() function only generated incrementing integer arrays. + Support for character sequences and decrementing arrays was added in 4.0.7. + + - See shuffle for an example of its use. + See shuffle for another example of its use.