yolop Posted September 1, 2008 Share Posted September 1, 2008 i need "for" that print all the word between "a" - to- "zzzzzzzz" like.. a b c ...... z aa ab ..... zz aaa aab .... zzz .... aaaa .... how i do that please??? thankkk Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted September 1, 2008 Share Posted September 1, 2008 What? Why? What do you plan on cracking? Quote Link to comment Share on other sites More sharing options...
valtido Posted September 1, 2008 Share Posted September 1, 2008 $as = 'a'; for ( $counter = 0; $counter< 100 ; $counter++) { echo $as.'<br />'; $as++; } do not hackkkkkkkk lol im not responsible for this crap hahah Quote Link to comment Share on other sites More sharing options...
ranjuvs Posted September 1, 2008 Share Posted September 1, 2008 $alphabets = array(1=>'a',2=>'b',3=>'c',4=>'d'); //as you need to print 5 z's at last -> loop the fisrt loop for 5 for($outer = 1;$outer <= 5;$outer++) { foreach($alphabets as $alpha) { for($i=1;$i<=$outer;$i++) print $alpha; print "\n"; } } Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 1, 2008 Share Posted September 1, 2008 Do you realize how long that will take and how many strings you will be generating? (Answer 8,353,082,582) Ken Quote Link to comment Share on other sites More sharing options...
yolop Posted September 1, 2008 Author Share Posted September 1, 2008 it's not for hack this is what your script do a b c d aa bb cc dd aaa bbb ccc ddd aaaa bbbb cccc dddd i what after "aa" will show "ab" not bb thank Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted September 1, 2008 Share Posted September 1, 2008 valtido should do what you want. But kenrbnsn is right. It's ridiculous, the server load would be intense. It may even result in a timeout due to the time it could take. Quote Link to comment Share on other sites More sharing options...
yolop Posted September 1, 2008 Author Share Posted September 1, 2008 Do you realize how long that will take and how many strings you will be generating? Ken i need that for only to realize how it's work in my system i will use that ..... i will get "word" like "abcc" and I need to print what's the next word in this case after "abcc" is"abcd" so i need something like that Quote Link to comment Share on other sites More sharing options...
valtido Posted September 1, 2008 Share Posted September 1, 2008 lol i did try n post that but because someone posted it didnt really go through hey he asked for a stupid code lol i gave him one he cold seperate the code lol and start it from another bit instead a like $as = 'aaadcb'; for ( $counter = 0; $counter< 100 ; $counter++) { echo $as.' '; $as++; } so its first value would be 'aaadcb' and then 'aaadcc' and so on i did give him up 100 output lol he can chnage it till it crashes the browser or times out lol fairly simple Quote Link to comment Share on other sites More sharing options...
valtido Posted September 1, 2008 Share Posted September 1, 2008 after all it was a stupid request and a stupid script lol but it really does give him what he wants Quote Link to comment Share on other sites More sharing options...
Fadion Posted September 1, 2008 Share Posted September 1, 2008 Lol i just tried having a $counter<100000 on my 2GHz Core2Duo and it took forever until it printed the last value of: "eqxd". For more then that, one will need a mainframe Quote Link to comment Share on other sites More sharing options...
valtido Posted September 1, 2008 Share Posted September 1, 2008 thats because it timed out or it crashed ur browser lol or something Quote Link to comment Share on other sites More sharing options...
yolop Posted September 1, 2008 Author Share Posted September 1, 2008 thank man Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted September 1, 2008 Share Posted September 1, 2008 I can't remember what I put it too, but it kept loading and displaying as it went for about 20 seconds and I got sick of it. So I closed. Quote Link to comment Share on other sites More sharing options...
matmunn14 Posted September 1, 2008 Share Posted September 1, 2008 Lol i just tried having a $counter<100000 on my 2GHz Core2Duo and it took forever until it printed the last value of: "eqxd". For more then that, one will need a mainframe Wonder how it would go on my 2.4ghz core 2 quad Quote Link to comment Share on other sites More sharing options...
valtido Posted September 1, 2008 Share Posted September 1, 2008 $as = 'a'; for ( $counter = 0; $counter< 1000000 ; $counter++) { echo $counter.'-'.$as.'<br />'; $as++; } lol this is funny 177144 - jbag lol so u see it takes a long time lol but gives the guy the result lol Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 1, 2008 Share Posted September 1, 2008 This sounds very much like a homework assignment, if so, we don't help you with your homework. Ken Quote Link to comment Share on other sites More sharing options...
Fadion Posted September 1, 2008 Share Posted September 1, 2008 Wonder how it would go on my 2.4ghz core 2 quad I'm sure it won't go far Quote Link to comment Share on other sites More sharing options...
valtido Posted September 1, 2008 Share Posted September 1, 2008 lol believe it or not this was some code that was used long time ago to crash computers when computers had little processors back in the days lol hackers felt genius of that at the time lol but they used it on visual basic or java or them programming languages more like a virus or something lol n set it up to run on start up lol Quote Link to comment Share on other sites More sharing options...
yolop Posted September 1, 2008 Author Share Posted September 1, 2008 hi $as = 'az'; for ( $counter = 0; $counter< 3 ; $counter++) { echo $as.''; $as++; } it's good but i want to save like that and print $as = 'az'; for ( $counter = 0; $counter< 1 ; $counter++) { $as=$as.''; $as++; } echo $as why it's doesn't work????? Quote Link to comment Share on other sites More sharing options...
valtido Posted September 1, 2008 Share Posted September 1, 2008 use MS excel lol type a and drag down till the end lol i think that would work to u might need to pres Ctrl aswell lol thatway u have them saved then copy and paste besides where do you want to save them ? Quote Link to comment Share on other sites More sharing options...
Fadion Posted September 1, 2008 Share Posted September 1, 2008 <?php $as .= $as; //case 1 $as .= $as . '\n'; //case 2 $as .= $as . '<br />'; //case 3 ?> Choose whatever you like. Quote Link to comment Share on other sites More sharing options...
matmunn14 Posted September 2, 2008 Share Posted September 2, 2008 hi $as = 'az'; for ( $counter = 0; $counter< 3 ; $counter++) { echo $as.''; $as++; } it's good but i want to save like that and print $as = 'az'; for ( $counter = 0; $counter< 1 ; $counter++) { $as=$as.''; $as++; } echo $as why it's doesn't work????? Because you are resetting the variable $as within the loop. Quote Link to comment Share on other sites More sharing options...
saiko Posted September 2, 2008 Share Posted September 2, 2008 $as = 'a'; for ( $counter = 0; $counter< 1000000 ; $counter++) { echo $counter.'-'.$as.'<br />'; $as++; } lol this is funny 177144 - jbag lol so u see it takes a long time lol but gives the guy the result lol valtido you say "lol" to much. there is no need for it, its annoying. Quote Link to comment Share on other sites More sharing options...
Fadion Posted September 2, 2008 Share Posted September 2, 2008 valtido you say "lol" to much. there is no need for it, its annoying. I noticed that too (everybody must have noticed it). You can count 4-5 lols in just one of his post and doing a forum search for "lol" will bring up only valtido's posts Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.