4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 All Combinations Of Letters
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Iyonix
WebHelper
WebHelper


Joined: 12 Nov 2002
Posts: 82
Location: Yarm, England

PostPosted: Sat Aug 09, 2003 11:23 am (14 years, 4 months ago) Reply with QuoteBack to Top

I want a script that generates all combinations of letters up to 4 characters in lowercase. here is my code sofar, but it doesn't work :o

Code:

<?php
$i=97;
while($i<97+26){
echo chr($i);
}
?>


If I try doing anything else it doesn't work Sad

________________________________
Iyonix
OfflineView User's ProfileFind all posts by IyonixSend Personal Message
jayant
Team Member



Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India

PostPosted: Sat Aug 09, 2003 6:45 pm (14 years, 4 months ago) Reply with QuoteBack to Top

Code:
<?php
for($i1 = 'A';$i1<='Z';$i1++)
  for($i2 = 'A';$i2<='Z';$i2++)
    for($i3 = 'A';$i3<='Z';$i3++)
      for($i4 = 'A';$4<='Z';$i4++)
        echo "\n".$i1.$i2.$i3.$i4;
?>

havent tried it, but see no reason why it wouldn't work

________________________________
Jayant Kumar
Member of the 4WebHelp Team
Nibble Guru - Computing Queries Demystified
GZip/ Page Compression Test
OfflineView User's ProfileFind all posts by jayantSend Personal MessageVisit Poster's WebsiteYahoo MessengerMSN Messenger
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.061653 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme