note 47798 deleted from function.range by sean

From: Date: Tue, 30 Nov 2004 17:44:32 +0000
Subject: note 47798 deleted from function.range by sean
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-81193@lists.php.net to get a copy of this message
Note Submitter: Forrester00 at gmail dot com ---- To don wilson at gmail dot com: <?php // range() limitation for PHP <5.0.0 function myRange($num1, $num2, $step=1) { for($i = $num1; $i <= $num2; $i += $step) { $temp[] = $i; } return $temp; } ?> While this maybe "nicer" version of my code and has less lines of code, it lacks a termendous amount of functionality (namely accounting for alphabet ranges). j dot gizmo at aon dot at's function works very well. Please test your functions before posting them, 2 people have e-mailed me about your comment, this is the only reason why I even looked back here.

« previous php.notes (#81193) next »