<?php
$data = '1-5';
$data = '01-05';
$data = '0021-0025';
$data = '000101-000108';
list($start_at, $end_at) = split('-', $data);
$formatStr = "%0" . strlen($start_at) . "d";
$arr_data = '';
for ($i = intval($start_at); $i <= intval($end_at); $i++)
{
$arr_data .= sprintf( $formatStr, $i ).'<br>';
}
echo $arr_data;
?>
|