plznty Posted April 13, 2011 Share Posted April 13, 2011 Could somebody give me help on how to create a script that puts down all the possible 2 character sequences from A-Z 0-9 For example Aa Ab Ac ...... Z9 Thank you in advance. Link to comment https://forums.phpfreaks.com/topic/233554-php-every-possible-sequence/ Share on other sites More sharing options...
Porl123 Posted April 13, 2011 Share Posted April 13, 2011 <?php $chars = array(0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'); foreach($chars as $x) { foreach($chars as $y) { echo $x.' '.$y.'<br />'; } } ?> I'm sure there are better ways, but that's how I'd do it. Link to comment https://forums.phpfreaks.com/topic/233554-php-every-possible-sequence/#findComment-1200931 Share on other sites More sharing options...
QuickOldCar Posted April 13, 2011 Share Posted April 13, 2011 Here's that example in a more complex code that does other things too. http://get.blogdns.com/dynaindex/generator.php?character=alphabetnumber&length=2&amount=10000&sort=asc&protocol=&tldext=&hyperlink=no There's a post here at the forums that a few members were posting various ways on how to do this. http://www.phpfreaks.com/forums/index.php?topic=320258.0 Link to comment https://forums.phpfreaks.com/topic/233554-php-every-possible-sequence/#findComment-1200938 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.