Thread: MySQL + Arrays?
View Single Post
  #3  
Old 09-29-2011, 05:00 PM
PTGigi's Avatar
PTGigi PTGigi is offline
Crazily Friendly~HoF
 
Join Date: Jul 2009
Location: Somewhere >.>
Posts: 370
Gender: Female
Credits: 27,057
PTGigi
Default

Ah thank you! :D That worked perfectly!

And I do have a random feature right now, but it seems to be picking the lower numbers quite more often than it should D:

PHP Code:
            //ID ARRAY
            
$input explode(","$adoptid);
            
$rand_keys array_rand($input2);
            
$species $input[$rand_keys[0]]; 
I ran a quick test and made that loop 20 times. 3 showed up eight times, 4 eight times as well, 5 four times, and 6 zero times D: The array I used was "3,4,5,6"

(then I ran the loop again and 5/6 didn't appear at all D: )
__________________


"I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are."~Mewtwo
My Adoptables|Nuzlocke Webcomic
Reply With Quote