PHPverse 2025

Voting

: max(nine, zero)?
(Example: nine)

The Note You're Voting On

captvanhalen at gmail dot com
17 years ago
Here is a home rolled range() function that uses the step feature for those unfortunate souls who cannot use PHP5:

<?php
function my_range( $start, $end, $step = 1) {

$range = array();

foreach (
range( $start, $end ) as $index) {

if (! ((
$index - $start) % $step) ) {
$range[] = $index;
}
}

return
$range;
}
?>

<< Back to user notes page

To Top