herculesnetwork
Forum Replies Created
-
Yes sure. It’s interesting yes ??
Improve the code, learn more, then there is random_int () that stands above mt_rand and rand when it comes to shuffling things!I think that your words: (“It doesn’t really matter here”) was because, Only to make a random better, more mixed, in that case, might not be so interesting, because the strength of our custom function, is maximized absurdly, when our condition, examine with foreach our giant library of 2000 numbers has already returned before (Those manually entered), And preg_match disallow the echo with mach based in Thousands of subsections made with our slice,This forces an absurdly different output in the shortest stretches, so preg_match does a random results much stronger than any single mt_rand or rand or perhaps random_int because preg_match has a giant sub_slice array in its power,but I was very happy to know of random_int () and absolutely interests me yes!
Cutting the cut randomlly?!! Yes .. I even tried to make a code similar to yours in custom function using shuffle, but it did not work, I can only do it with mt_rand, so I did it very differently, yes, if it shuffles less, and uses more machine resources, Let’s try using random_int () ??
- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
Yes, speaking in the future, I added many hundreds of results in a colossal arrays of 2000 results old srsrsrs my stepfather wanted to manually list all of them srsr I said no .. do you have this list in excel? He said yes, so I did a 3 second search on google and sent the link to it, and he used excel to follow my hint of putting a comma in front of all the cell cells in every number of dozens of the old results
And told him to foul the end of each lines and the beginning too:
# 1,2,3,4,5,6,7,8,9 … 19 &
? Then in linux’s gedit editor, I used find and replace to change the startup: switch # array (
And find and replace with the final dirt% by);
I use find and replace for many things, then I can change all, for ‘,’ or ‘,’
This already saved me a lot in gigantic arraysI managed to find a solution with shuffle, inside function I used return like this:
return array_slice($numbers, 0, $quantity);
And then I called down there:
$provisional = get_rand_array(1,25,15); // our custom function
Even with 2000 queries, it was not slow, it is in a VPS nginx + php7.0-fpm very well configured by me modesty part: p hahaha … with 4gb ram + ssd, processor intel very modern, but it is kvm machine, but Is doing well, and they say that php7 is much faster (I do not understand this fame but they say). 2 new results will be added manually in previous results 1 time per month, I think it holds up well. In one year, 24 new results.
I learned a lot this time too. ??
THAAAAANKSSSSSS again @bcworkz
- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
I’m lost srsr
$numbers = range(1, 120); shuffle($numbers); function get_rand_array($min, $max, $quantity) { $numbers = range($min, $max); shuffle($numbers); return get_rand_array(1,120,19) ); } //print_r( get_rand_array(1,120,19) );
it’s already 99,9% completed… just needed exclusive output numbers.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
just a echo with implode to the output!! Nice!
The small problem, not in our code, your CODE is PERFECT … he forgot to tell me a detail, that the results of 19 numbers, should be numbers inedible among themselves srsrrs how do I make a rand for no ten repeat itself? That’s a shame, I suppose.
How to generate a rand, with unique numbers in the result?
or
how to Generate random numbers without repetitions in th output ??This is happening on the way out: repetition of tens, I laughed and said that it was his fault of not having “spoken to us” srsr 2x 19 2x 6 3x 15 srsrsr
1,19,3,4,5,6,7,8,6,10,15,12,13,15,15,16,17,18,19should mt_rand ?
- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
Hey My friend … About learning PHP, it makes a lot of sense what you said, yes, the best programmers really learn by doing it, in bravery, as a Brazilian Rodrigo Souza says, who is well known at YT for supporting Brazilian programmers who want to go to the US, he says. That the best programmers have never taken courses, learned in forums / communities, and trying to write, and are the best paid because they write with quality, because they compensate with a lot of effort to justify not having “studied”. I’ve learned a lot here, since I will not make gigantic arrays(in so many cases) after discovering regex with you and learning ($ x = 0; $ x <= 18; $ x ++)
THANKKSSSSSS @bcworkz.
I mean … of course I know how to clear the on-screen display, similar to what I did on embed ??
But I really want to learn because the exit is like this! And do not to leave that way.Thankssssss ??
<?php echo 'my rand To return 19 integers, with the guarantee of not repeating any stretch up to 7 digits of these previous results:'.'<br>'; /* function get_rand_array(){ $numberstorand = array("1,","2,","3,","4,","5,","6,","7,","8,","9,","10,","11,","12,","13,","14,","15,","16,","17,","18,","19,","20,","21,","22,","23,","24,","25,","26,","27,","28,","29,","30,","31,","32,","33,","34,","35,","36,","37,","38,"); // here will be 120 numbers, and not just 38 :-$ $random_keys = array_rand($numberstorand,19); $result_of_rand = $numberstorand[$random_keys[0]].$numberstorand[$random_keys[1]].$numberstorand[$random_keys[2]].$numberstorand[$random_keys[3]].$numberstorand[$random_keys[4]].$numberstorand[$random_keys[5]].$numberstorand[$random_keys[6]].$numberstorand[$random_keys[7]].$numberstorand[$random_keys[8]].$numberstorand[$random_keys[9]].$numberstorand[$random_keys[10]].$numberstorand[$random_keys[11]].$numberstorand[$random_keys[12]].$numberstorand[$random_keys[13]].$numberstorand[$random_keys[14]].$numberstorand[$random_keys[15]].$numberstorand[$random_keys[16]].$numberstorand[$random_keys[17]].$numberstorand[$random_keys[18]]; */ function get_rand_array() { $rand19 = array(); //start with empty array for ($x = 0; $x <= 18; $x++) { $rand19[ $x ] = rand( 1, 120 ); } return $rand19; } // This values will always be updated manually, every time I make use of a result, I will insert here for ninca I use anything with up to 7 consecutive digits in any stretch, slice of these results $previous_results_manually_inserted = array( array(12,21,34,1,51,87,42,49,37,119,101,7,111,17,11,19,02,15,06), array(03,05,01,18,61,75,92,84,36,81,02,07,90,02,71,17,08,51,37), array(81,72,91,22,75,87,33,97,120,11,17,65,44,73,27,30,41,74,88), ); $condition = 1; // initiate the condition while ( 1 === $condition ) { $condition = 0; // tentatively clear the condition, any match will reset it $provisional = get_rand_array(); // our custom function // possible start from 0 to 19-7 for ($y = 0; $y <= 12; $y++) { $provisional_sub = array_slice( $provisional, $y, 7 ); //get 7 element sub-array //TO DO: be sure we eventually check all numbers in $provisional with no overflow $test = implode('-', $provisional_sub); //glue must match that in foreach // check all elements of main array foreach ( $previous_results_manually_inserted as $previous ) { $previous_str = implode('-', $previous ); $match = preg_match("/.*$test.*/", $previous_str ); if ( 1 === $match ) { $condition = 1; break 2; // if a match, stop checking and get a new random array } } } } // no matches to get here $previous_results_manually_inserted[] = $provisional; print_r( $provisional ); // output each array added
output:
my rand To return 19 integers, with the guarantee of not repeating any stretch up to 7 digits of these previous results:
Array ( [0] => 45 [1] => 39 [2] => 65 [3] => 112 [4] => 29 [5] => 76 [6] => 16 [7] => 46 [8] => 85 [9] => 113 [10] => 80 [11] => 32 [12] => 18 [13] => 61 [14] => 24 [15] => 16 [16] => 32 [17] => 92 [18] => 19 )
But how to convert this print_r above to this:
45, 39, 65, 112, 29, 76, 16, 46, 85, 113, 80, 32, 18, 61, 24, 16, 32, 92, 19
Your rand code much smaller than mine and it works ??- This reply was modified 7 years, 11 months ago by herculesnetwork.
With that recent code I posted, I did not get any error, only white screen, I got error in the previous one, because I closed the function in the wrong place! I’ll see your answer now ??
I think I understood the code:
<?php echo 'my rand To return 19 integers, with the guarantee of not repeating any stretch up to 7 digits of these previous results:'.'<br>'; function get_rand_array(){ $numberstorand = array("1,","2,","3,","4,","5,","6,","7,","8,","9,","10,","11,","12,","13,","14,","15,","16,","17,","18,","19,","20,","21,","22,","23,","24,","25,","26,","27,","28,","29,","30,","31,","32,","33,","34,","35,","36,","37,","38,"); // here will be 120 numbers, and not just 38 :-$ $random_keys = array_rand($numberstorand,19); $result_of_rand = $numberstorand[$random_keys[0]].$numberstorand[$random_keys[1]].$numberstorand[$random_keys[2]].$numberstorand[$random_keys[3]].$numberstorand[$random_keys[4]].$numberstorand[$random_keys[5]].$numberstorand[$random_keys[6]].$numberstorand[$random_keys[7]].$numberstorand[$random_keys[8]].$numberstorand[$random_keys[9]].$numberstorand[$random_keys[10]].$numberstorand[$random_keys[11]].$numberstorand[$random_keys[12]].$numberstorand[$random_keys[13]].$numberstorand[$random_keys[14]].$numberstorand[$random_keys[15]].$numberstorand[$random_keys[16]].$numberstorand[$random_keys[17]].$numberstorand[$random_keys[18]]; // This values will always be updated manually, every time I make use of a result, I will insert here for ninca I use anything with up to 7 consecutive digits in any stretch, slice of these results $previous_results_manually_inserted = array( array(12,21,34,1,51,87,42,49,37,119,101,7,111,17,11,19,02,15,06), array(03,05,01,18,61,75,92,84,36,81,02,07,90,02,71,17,08,51,37), array(81,72,91,22,75,87,33,97,120,11,17,65,44,73,27,30,41,74,88), ); $condition = 1; // initiate the condition while ( 1 === $condition ) { $condition = 0; // tentatively clear the condition, any match will reset it $provisional = get_rand_array(); // our custom function // possible start from 0 to 19-7 for ($y = 0; $y <= 12; $y++) { $provisional_sub = array_slice( $provisional, $y, 7 ); //get 7 element sub-array //TO DO: be sure we eventually check all numbers in $provisional with no overflow $test = implode('-', $provisional_sub); //glue must match that in foreach // check all elements of main array foreach ( $previous_results_manually_inserted as $previous ) { $previous_str = implode('-', $previous ); $match = preg_match("/.*$test.*/", $previous_str ); if ( 1 === $match ) { $condition = 1; break 2; // if a match, stop checking and get a new random array } } } } // no matches to get here $previous_results_manually_inserted[] = $provisional; print_r( $provisional ); // output each array added }
while ( 1 === $condition ) { // while the condition is totally true, equal identical
Here: $ y = 0; $ And <= 12; ….. y is equal to 0 and $y is less than and equal to 12, I understand, but I did not understand y++, what is the most readable (++)?
Variable $provisional_sub stores the slicing of the previous results done with the function array_slice ()
$provisional variable stores our rand function
$Test variable stores the sub-values, slicing
Foreach traverses analyzing data from variable $previous_results_manually_inserted as $previous
$Previous_str stores the data analized by foreach and converted by implode
$Match stores the data compared to the $ test variables that stores the 7 converted slices with implode and the $previous_str variable that stores all previous and parsed results with foreach and converted with implode,
I do not know how to read the conditions well, but I understand that this is ready! Because it does not print on the screen yet! Everything is white, just with my headlines echo the top !!- This reply was modified 7 years, 11 months ago by herculesnetwork.
Now I understood where the query was made, the query in the result slice of 19 numbers ?? ($ y = 0; $ y <= 12; $ y ++) now I can customize this for several other cases, I was afraid Of this. I have already been forced to use Print_r($thevar) in several previous cases, var_dump too, not knowing why :-$ now, please, then tell me something to read about php, I have a very basic deficiencies and I already do several things, I imagine how it will be if I know how to write my ideas well … I sometimes do not have to create my things in localhost of my machine/laptop, and I do in a remote VPS/kvm machines, and sometimes I write something so grotesque, that wordpress drops, And I am prevented from entering the dashboard to fix the code, then I enter via ssh and go to the directory to edit the file by vim or nano! :-$ my knowledge in creating server and administrates them without a GUI/control panel and with access root total, saves me in my basic mistakes In programming.
??I do not understand, because when I understand converting with the implode, it complains that it expects to have an array to do the conversion, what do you mean? It looks like an array to me :-$
<?php echo 'my rand To return 19 integers, with the guarantee of not repeating any stretch up to 7 digits of these previous results:'.'<br>'; function get_rand_array(){ $numberstorand = array("1,","2,","3,","4,","5,","6,","7,","8,","9,","10,","11,","12,","13,","14,","15,","16,","17,","18,","19,","20,","21,","22,","23,","24,","25,","26,","27,","28,","29,","30,","31,","32,","33,","34,","35,","36,","37,","38,"); // here will be 120 numbers, and not just 38 :-$ $random_keys = array_rand($numberstorand,19); $result_of_rand = $numberstorand[$random_keys[0]].$numberstorand[$random_keys[1]].$numberstorand[$random_keys[2]].$numberstorand[$random_keys[3]].$numberstorand[$random_keys[4]].$numberstorand[$random_keys[5]].$numberstorand[$random_keys[6]].$numberstorand[$random_keys[7]].$numberstorand[$random_keys[8]].$numberstorand[$random_keys[9]].$numberstorand[$random_keys[10]].$numberstorand[$random_keys[11]].$numberstorand[$random_keys[12]].$numberstorand[$random_keys[13]].$numberstorand[$random_keys[14]].$numberstorand[$random_keys[15]].$numberstorand[$random_keys[16]].$numberstorand[$random_keys[17]].$numberstorand[$random_keys[18]]; } // This values will always be updated manually, every time I make use of a result, I will insert here for never I use anything with up to 7 consecutive digits in any stretch, slice of these results $previous_results_manually_inserted = array( array(12,21,34,1,51,87,42,49,37,119,101,7,111,17,11,19,02,15,06), array(03,05,01,18,61,75,92,84,36,81,02,07,90,02,71,17,08,51,37), array(81,72,91,22,75,87,33,97,120,11,17,65,44,73,27,30,41,74,88), ); $condition = 1; // initiate the condition while ( 1 === $condition ) { $condition = 0; // tentatively clear the condition, any match will reset it $provisional = get_rand_array(); // our custom function // possible start from 0 to 19-7 for ($y = 0; $y <= 12; $y++) { $provisional_sub = array_slice( $provisional, $y, 7 ); //get 7 element sub-array //TO DO: be sure we eventually check all numbers in $provisional with no overflow $result_of_rand = implode('-', $provisional_sub); //glue must match that in foreach // check all elements of main array foreach ( $previous_results_manually_inserted as $previous ) { $previous_str = implode('-', $previous ); $match = preg_match("/.*$result_of_rand.*/", $previous_str ); if ( 1 === $match ) { $condition = 1; break 2; // if a match, stop checking and get a new random array } } } } // no matches to get here $previous_results_manually_inserted[] = $provisional; print_r( $provisional ); // output each array added //implode ($result_of_rand == $previous_results_manually_inserted); //$match = preg_match("/.*$result_of_rand.*/", $previous_results_manually_inserted ); //echo $match; //echo $result_of_rand; ?>
Where do I start my preg_match daughter to see the slices from the previous results??
I managed to win 2 beautiful errors with this my montage of the strutural code :-$
Warning: implode(): Invalid arguments passed in /opt/lampp/htdocs/php/rand_numbers3.php on line 23Warning: array_slice() expects parameter 1 to be array, null given in /opt/lampp/htdocs/php/rand_numbers3.php
And I create keyboard shortcuts in my linux to call things, terminals with commands, applications, etc … one of them is the htop, that way I set things up, blew my 8gb of dual channel + core i5 4th generation(too with 2 browsers and 30 taps in each :-$ ), the machine Was so slow, I was so nervous that I did not know if I called the htop to see what was happening, or called the GUI xampp to stop the services, and of course, my indecision resulted in the total of my laptop :-$ … I can not use php.ini in stock, I’ll limit the use of resources.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
Oops, I did not really understand the actual usage of the implode so far, :-$
I have almost a notebook of the things I learn here ??
Yes, when you said it complicated, really spoke very seriously ssrsrs this thing has a knot in my brain! Wow !!!
Yes bcworks, that’s exactly it, the analize about the previous results should happen to each key, I know, that this is the complex, I took some time to understand what he wanted, exactly that, 19 numbers, not Accept no 7-digit sequence throughout the end-to-end section, start from the 1st key and look for match up to the 7th key. Then on the 2nd key, and look for math up to the 8th key ….
I had an idea, once I had to do a big cleanup of bans in a text field, and I did a large queue of preg_replace, srsr got ugly, but it worked fine as I wanted to do severalls restrictions to the field .. I did it then:$Just_a_text_field preg_replace ("/ 1_disallow_type /", '', $just_a_text_field); $Just_a_text_field preg_replace ("/ 2_disallow_type /", '', $just_a_text_field); $Just_a_text_field preg_replace ("/ 3_disallow_type /", '', $just_a_text_field); $Just_a_text_field preg_replace ("/ 4_disallow_type /", '', $just_a_text_field);
It was kind of impossible to do in a single line of expression regex
So in I would do single expressions and apply several times in the same variable …
11 restrictions, eleven lines srsrsrsI do not know how to work with partial data, as you do, key to key of the variable for example, I’ll learn it, I see many foreach codes doing things like that, I have not yet learned, but I will.
I had this idea:
Could we do several lines of preg_match… 13 lines :-$ ?
Let's work with the first result: 12,21,34,01,51,87,42,49,37,119,101,7,111,17,11,19,02,15,06 Our rand, may not have the following sequences: 12,21,34,01,51,87,42 21,34,01,51,87,42,49 34.01, 51, 47, 42, 47, 37 01,51,87,42,49,37,119, 51.87,42,49,37,119,101 , 87.42,49,37,119,101.7, 42.49,37,119,101.7,111, , 37,119,101,7,111,17,11 119,101,7,111,17,11,19, 101.7,111,17,11,19,02, 7,111,17,11,19,02,15 111.17,11,19,02,15,06
Would not it be possible to make a preg_match with each piece of the previous results, and then to echo the result of the rand in case none of those pieces happen to match?
I have had this idea now and resolve to express it to you, and I am going to analyze now to see the maximum I can understand from your recent response in this truly complex case for me.
Thaaaankss…..- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
Hi again … I did all with arrays:
<?php echo 'my rand To return 19 integers, with the guarantee of not repeating any stretch up to 7 digits of these previous results:'.'<br>'; $numberstorand = array("1,","2,","3,","4,","5,","6,","7,","8,","9,","10,","11,","12,","13,","14,","15,","16,","17,","18,","19,","20,","21,","22,","23,","24,","25,","26,","27,","28,","29,","30,","31,","32,","33,","34,","35,","36,","37,","38,"); // I did just with 38 to don't write up to 120 srsrsr $random_keys = array_rand($numberstorand,19); $result_of_rand = $numberstorand[$random_keys[0]].$numberstorand[$random_keys[1]].$numberstorand[$random_keys[2]].$numberstorand[$random_keys[3]].$numberstorand[$random_keys[4]].$numberstorand[$random_keys[5]].$numberstorand[$random_keys[6]].$numberstorand[$random_keys[7]].$numberstorand[$random_keys[8]].$numberstorand[$random_keys[9]].$numberstorand[$random_keys[10]].$numberstorand[$random_keys[11]].$numberstorand[$random_keys[12]].$numberstorand[$random_keys[13]].$numberstorand[$random_keys[14]].$numberstorand[$random_keys[15]].$numberstorand[$random_keys[16]].$numberstorand[$random_keys[17]].$numberstorand[$random_keys[18]]; $previous_results_manually_inserted = array( array(12,21,34,1,51,87,42,49,37,119,101,7,111,17,11,19,02,15,06), array(03,05,01,18,61,75,92,84,36,81,02,07,90,02,71,17,08,51,37), array(81,72,91,22,75,87,33,97,120,11,17,65,44,73,27,30,41,74,88), ); implode ($result_of_rand == $previous_results_manually_inserted); $match = preg_match("/.*$result_of_rand.*/", $previous_results_manually_inserted ); echo $match; //echo $result_of_rand; ?>
I get errors:
1-Warning: implode(): Argument must be an array in /opt/lampp/htdocs/php/sorteio2.php on line 14
2-Warning: preg_match() expects parameter 2 to be string, array given in /opt/lampp/htdocs/php/sorteio2.php on line 15
Off course, I’m wrong at implode and preg_match ??
// Ooops!! An addend: if you repeat 6 or less, accept and echo, if you repeat 7 or more than 7 numbers, rand again.- This reply was modified 7 years, 11 months ago by herculesnetwork.
I’m anxious to see this … here I did the rand code with a conditional totally unnecessary, my totally useless condition srsr condition because it is impossible to repeat all 19 digits, I commented this srrsrsr interesting is even that you understood, only analyze partial of 7 digits, starting with each key on , Giving each key of all previous results, from 1 to 7, from 2 to 8, from 3 to 7, etc… yes my friend, you already understand what I’m needing ??
I do not think I’m able to implement your suggestions :-$<?php echo 'my rand To return 19 integers, with the guarantee of not repeating any stretch up to 7 digits of these previous results:'.'<br>'; $dig1 = rand( 1, 120 ); $dig2 = rand( 1, 120 ); $dig3 = rand( 1, 120 ); $dig4 = rand( 1, 120 ); $dig5 = rand( 1, 120 ); $dig6 = rand( 1, 120 ); $dig7 = rand( 1, 120 ); $dig8 = rand( 1, 120 ); $dig9 = rand( 1, 120 ); $dig10 = rand( 1, 120 ); $dig11 = rand( 1, 120 ); $dig12 = rand( 1, 120 ); $dig13 = rand( 1, 120 ); $dig14 = rand( 1, 120 ); $dig15 = rand( 1, 120 ); $dig16 = rand( 1, 120 ); $dig17 = rand( 1, 120 ); $dig18 = rand( 1, 120 ); $dig19 = rand( 1, 120 ); $myresult = $dig1 .', '. $dig2 .', '. $dig3 . ', ' . $dig4 .', '. $dig5 .', '. $dig6 .', '. $dig7 .', '. $dig8 .', '. $dig9 .', '. $dig10 .', '.$dig11 .', '. $dig12 .', '.$dig13 .', '. $dig14 .', '.$dig15 .', '. $dig16 .', '.$dig17 .', '. $dig18 .', '.$dig19; $myresult; $previous_results_manually_inserted = array( array(12,21,34,1,51,87,42,49,37,119,101,7,111,17,11,19,02,15,06), array(03,05,01,18,61,75,92,84,36,81,02,07,90,02,71,17,08,51,37), array(81,72,91,22,75,87,33,97,120,11,17,65,44,73,27,30,41,74,88), array(1,2,3), array(3,2,1), ); /*if ($myresult == $previous_results_manually_inserted){ $dig1 = rand( 1, 120 ); $dig2 = rand( 1, 120 ); $dig3 = rand( 1, 120 ); $dig4 = rand( 1, 120 ); $dig5 = rand( 1, 120 ); $dig6 = rand( 1, 120 ); $dig7 = rand( 1, 120 ); $dig8 = rand( 1, 120 ); $dig9 = rand( 1, 120 ); $dig10 = rand( 1, 120 ); $dig11 = rand( 1, 120 ); $dig12 = rand( 1, 120 ); $dig13 = rand( 1, 120 ); $dig14 = rand( 1, 120 ); $dig15 = rand( 1, 120 ); $dig16 = rand( 1, 120 ); $dig17 = rand( 1, 120 ); $dig18 = rand( 1, 120 ); $dig19 = rand( 1, 120 ); $myresult = $dig1 .', '. $dig2 .', '. $dig3 . ', ' . $dig4 .', '. $dig5 .', '. $dig6 .', '. $dig7 .', '. $dig8 .', '. $dig9 .', '. $dig10 .', '.$ $myresult; */ //Implode ($myresult == $previous_results_manually_inserted); //$match = preg_match("/.*$myresult.*/", $previous_results_manually_inserted ); //echo match; //}else{ echo $myresult; //} ?>
I was not able to understand the use of the implode, please do with my original arrays above so I understand how it would be applied :-$
This is the way I found to do the rand with 120 numbers, but I think it would be better to do it with arrays to apply the implode, as would arrays with that rand?
Cheers. THAaaaankssss ??
- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
I’ll try to write something with this tips ?? , then we add the repeat question to 7 digits of the 19
Hi my friend, yes … let’s do this rand with unedited sequences exits “now” ??
Yes I need something like you said, but one thing missing:Will be a lot of 19 numbers, a large array with numbers from 1 to 120, will draw 19 numbers, and this rand will check if in other array with manually entered earlier results, not already have, but are not completely equal amounts that I am Need to re-issue, I need to reject patiently repeated numbers:
Let’s say miraculously, the previous results that I added in the array of numbers already drawn in the past has been:
$Previousresults = array (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19);
I need a code that evaluates sequences that have already been created,
And I did not repeat more than 6 equal numbers:
x,x,x,x,1,2,3,4,5,6,7,x,x,x,x,x,x,x
x,x,x,x,5,6,7,8,9,10,11,x,x,x,x,x,x
x,x,x,x,12,13,14,15,16,17,18,x,x,x,If the rand partially repeats up to 7 numbers, the function does not execute the echo, and resumes the rand until it can not find 7 sequences found in the previous results manually annotated in a array. if repeat up to 6 or less, echo, if repeat 7 or more, rand again
?This business is complex, it took me a lot at a table with my stepfather to understand, because it’s a bad explanation too, srsrsr but the case is really complex at first glance.
- This reply was modified 7 years, 11 months ago by herculesnetwork.
- This reply was modified 7 years, 11 months ago by herculesnetwork.