Jump to content

PHP every possible sequence


plznty

Recommended Posts

<?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.

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.