From: [EMAIL PROTECTED] Operating system: Any PHP version: 4.1.2 PHP Bug Type: Feature/Change Request Bug description: range() with a step parameter
I think it would be useful in some situation if the range() function can take a third optional parameter (called "step" or whatever you want) which specifies the space between two consecutive elements in the resulting array. For example: $array = range(1, 5, 2); // array(1,3,5); It might be always positive to understand its effect easily. $array = range('Z', 'A', 3); // array('Z', 'W', 'T', 'Q', ...); If the second boundary cannot be included regarding to the step parameter, just simply leave it out: $array = range(1, 6, 2); // array(1,3,5); That's all. -- Edit bug report at http://bugs.php.net/?id=15920&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=15920&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=15920&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15920&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15920&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15920&r=support Expected behavior: http://bugs.php.net/fix.php?id=15920&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15920&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=15920&r=submittedtwice