[PHP] Generating sequence of AlphaNumber

2007-11-14 Thread Jeffery Fernandez
Hi all, 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

Re: [PHP] Generating sequence of AlphaNumber

2007-11-14 Thread Stephen Edberg
On Thu, 15 Nov 2007, Jeffery Fernandez wrote: > Hi all, > > 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 whe

Re: [PHP] Generating sequence of AlphaNumber

2007-11-14 Thread Casey
Try sprintf(). On Nov 14, 2007, at 4:32 PM, Jeffery Fernandez <[EMAIL PROTECTED]> wrote: Hi all, 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 separa

Re: [PHP] Generating sequence of AlphaNumber

2007-11-14 Thread Jeffery Fernandez
On Thu, 15 Nov 2007 11:48:07 am Stephen Edberg wrote: > On Thu, 15 Nov 2007, Jeffery Fernandez wrote: > > Hi all, > > > > 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 i

RE: [PHP] Generating sequence of AlphaNumber

2007-11-15 Thread Ford, Mike
On 15 November 2007 00:32, Jeffery Fernandez wrote: > How > can I get a sequence of values like: > > AX0001 > AX0002 > AX0003 > AX0004 > . > AX0099 > AX0100 > > and so on ? Actually, the ++ operator will do this for you: $seq = "AX"; ++$seq; // AX0001 ++$seq; // AX0002 Cheers!

Re: [PHP] Generating sequence of AlphaNumber

2007-11-15 Thread Richard Heyes
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