Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

all possible 3digit combinations (a-z0-9) script...

Posted on 2005-04-29
5
Medium Priority
?
336 Views
Last Modified: 2008-01-09
I need a script that can output all possible 3digit combinations of a-z0-9.  So EG: a3b, 33b, etc.  I know it's pretty simple, just need some information or code on how to do it :)

Thanks in advance!
0
Comment
Question by:lamerhooDJV
  • 3
  • 2
5 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 13897426
hw?
0
 
LVL 1

Author Comment

by:lamerhooDJV
ID: 13897432
hw?
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 13897436
is this homework?
0
 
LVL 1

Author Comment

by:lamerhooDJV
ID: 13897441
no sir, merely for curiosity on how to do it :)
0
 
LVL 18

Accepted Solution

by:
bobbit31 earned 2000 total points
ID: 13897546
<?php

$arrChars = array( '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',
           '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' );

for ($i=0;$i<count($arrChars);$i++) {
    for ($j=0;$j<count($arrChars);$j++) {
        for ($k=0;$k<count($arrChars);$k++) {
            printf("$arrChars[$i]$arrChars[$j]$arrChars[$k]<br>");
        }
    }
}

?>
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question