![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Hi all, I need a fast algorithm which generate strings like those: aaa aab .. .. .. aaz aba aca .. .. .. aza baa caa .. .. zaa abb abc abd .. .. abz acb acd .. .. acz Pratically i want generate all possible combination which can be obtained using alphabet's letters. Various strings should be printed on the screen. Can some one help me? Sorry for my bad english Thanks Andrea | |||
|
| Advertisements |
| | #2 | ||
| "Muppy" <muppino@libero.it> wrote: > Hi all, I need a fast algorithm which generate strings like those: > > aaa > aab > . > aaz > aba > aca > > Pratically i want generate all possible combination which can be > obtained using alphabet's letters. Various strings should be printed > on the screen. Can some one help me? Hi Andrea, Try: foreach(range('a', 'z') as $lt_1){ foreach(range('a', 'z') as $lt_2){ foreach(range('a', 'z') as $lt_3){ echo $lt_1.$lt_2.$lt_3."<br>"; } } } HTH; JOn | |||
|
| | #3 | ||
| > Modify the code he has already given you. It's not difficult. Hy, i tried modifing range('a', 'z') into range("a","z","0","9") but it gives an error. Sorry, but i'm new to php. Any help? Andrea | |||
|
| | #4 | ||
| Hi Muppy In news:MzcTa.195520$Ny5.5538262@twister2.libero.it you wrote: >> Modify the code he has already given you. It's not difficult. > Hy, i tried modifing range('a', 'z') into range("a","z","0","9") but it > gives an error. Sorry, but i'm new to php. > Any help? Then experiment. Try range('0','z') or range('a','9') and see what happens. The best way to learn is to try things out. -- Fishter unhook to email me | http://www.fishter.org.uk/ | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: generating, strings |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Good simple method for encrypting/decrypting strings? | Robert Oschler | PHP | 3 | 07-01-2007 3:38 PM |
| Here's Another Great Traffic Generating Site | Wkathome | Building An Internet Business | 0 | 06-11-2007 12:18 AM |
| Where's info on search for partial strings? (e.g., wildcards, regular expressions, ...) | david.goggin@gmail.com | MSN questions | 0 | 05-28-2007 1:45 AM |
| PEAR::HTML_Menu generating a select | Alex Grasman | Pear | 0 | 05-20-2007 6:34 PM |
| Featured Websites | ||||
|