Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

array

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

array

Postby lanana » Tue Jun 25, 2013 1:19 pm

Hi I'm trying to make an array contains the a-z follow by a number in 8 digits but it has to be repeated
before the 4 digit.

something like this,

a00010001
a00020002
a00030003
a00040004
a00050005
to
a10001000

and when it ends go to the next caracter

b00010001
b00020002
to
b10001000

hope can you give me an idea, Thanks !!
lanana
New php-forum User
New php-forum User
 
Posts: 3
Joined: Tue Jun 25, 2013 1:07 pm

Re: array

Postby johnj » Tue Jun 25, 2013 9:35 pm

Please read about the built-in php function called chr(). chr(65) is 'A'. so, find out what is 'a' and write code to produce what you want.
johnj
php-forum Super User
php-forum Super User
 
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm


Return to PHP coding => General

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.