NYCPHP Meetup

NYPHP.org

[nycphp-talk] Alphanumeric Range

Flavio daCosta nyphp at n0p.net
Wed May 10 16:40:13 EDT 2006


On 05/10/2006 04:11 PM, Donald J Organ IV wrote:
> Well basically i have a range of Canadian zip code prefixes such as A0A 
> through A9Z, i need all the values, between the two values.

AFAICT: PHP(5) can natively count by base 36.

$min = 'A0A';
$max = 'A9Z';
for ($i = $min; $i < $max; ++$i)
{
    echo $i, '<br />';
}




More information about the talk mailing list