I am having trouble generating a sequence of numbers from the following start
value:
AX0001
what I have done so far is loop through each character and check if its a
alphabet and separating the characters and digits.
But when I increment the digits, its strips of the leading zeros. How can I
get a sequence of values like:
AX0001
AX0002
AX0003
AX0004
.....
AX0099
AX0100
and so on ?
<?php
for ($i=0; $i<=100; $i++) {
echo 'AX' . sprintf('%04d', $i) . '<br />';
}
?>
--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk
Knowledge Base and HelpDesk software
that can cut the cost of online support
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php